Is there a way to force Session.refresh() to refresh child objects?
I have a parent object that contains a bag of child objects, which each have a Clob. If I save the parent, then refresh(parent) and try to edit one of the children, I get the following error:
java.lang.UnsupportedOperationException: Clob may not be manipulated from creating session.
But... if I refresh(parent), then iterate through the children and call refresh() individually on them, everything's fine. I just *really* don't want to have to do this manually, because I have a dozen classes and they each have a dozen collections, so manually refreshing all of them would get pretty messy.
Here's the general mapping:
<class name="Person">
<bag name="Children" cascade="all-delete-orphan" lazy="true">
<many-to-many class="Person"/>
</bag>
<property name="Comment" type="clob"/>
</class>
Thanks,
--ian
|