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
精彩评论