开发者

Question about Clob object in Hibernate

In the previous versions of Hibernate, it had the static api Hibernate.createClob(String), which allowed to create开发者_开发技巧 Clob object from String.

Now that this is deprecated, what is the proper way to store String as Clob in Hibernate?

I am having trouble figuring out how the Persistence Object (POJO) will look like.

Thank you.


JPA @Lob annotation:

@Lob
public String getFullText() { return fullText; }

See http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html for more info.


I had created a blog about how to read an Oracle XMLType into Hibernate. A Clob will also need a similar approach. I had written the details at

http://rationalspring.wordpress.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜