What is the alternate for deprecated Hibernate.createClob(Reader reader, int length)

后端 未结 3 1071
轮回少年
轮回少年 2020-12-21 01:33

Seems like Hibernate.createClob(Reader reader, int length) is deprecated in version 3.6.x And it suggests to use Use LobHelper.createClob(Reader, long)

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-21 02:32

    I was using the createBlob(bytes[]) from that class. I created a new class and the following method

        public static Blob createBlob(byte[] bytes) {
           return NonContextualLobCreator.INSTANCE.wrap(NonContextualLobCreator.INSTANCE.createBlob(bytes));
        }
    

提交回复
热议问题