Hi,
This might be a stupid question but...
I trying to use the solution entitled “Updated Clobs handling for Oracle
and Hibernate” on the main wiki.
My main concern is I'm not entirely sure how to use the StringClobType.
(I think the real issue, is I'm not sure how to use UserTypes, but I've
been unable to really find any good examples for doing this!)
Here's some pseudocode of what I am *trying* to do:
suppose I want to load a row that has a clob column and i want to change
it and then save it:
MyEntity obj = session.load(MyEntity.class, <primarykey>);
StringClobType stringClob = obj.getMyClobProperty();
//// At this point how am I going to get or change the contents of
stringClob ????
obj.setMyClobProperty(stringClob);
session.update(obj);
suppose I want instantiate a new row, and save my clob:
StringClobType newClob = ?????; /// at this point how am i going to
instantiate a new StringClobType
MyEntity obj = new MyEntity(..., ..., ...newClob)
session.save(obj);
Derrill
PS It's also quite confusing that there are a lot of different solutions
and the comments say they have more solutions and that the posted ones
are flawed... |