好像是 Hibernate.createClob(Reader reader, int length)
在 3.6.x 版本中已弃用
它建议使用使用 LobHelper.createClob(Reader, long)
反而。
但是LobHelper
是一个接口(interface)而不是一个类。static method Hibernate.createClob(Reader reader, int length)
有替代品吗? ?
最佳答案
我正在使用该类的 createBlob(bytes[]) 。我创建了一个新类和以下方法
public static Blob createBlob(byte[] bytes) {
return NonContextualLobCreator.INSTANCE.wrap(NonContextualLobCreator.INSTANCE.createBlob(bytes));
}
关于hibernate - 不推荐使用的 Hibernate.createClob(Reader reader, int length) 的替代方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9304211/