Hello,
I am developing an Eclipse RCP graphical editor application for biological pathways using
Eclipse Europa, hibernate3.2.2 with a hypersonic 1.8 database.
Our business model directly backs the application viewers. At present
we have a 'summary' view where we display name, description etc of a
given diagram. The diagram contents are not initialised (i.e., they are 'lazilyloaded' until an explict 'open diagram' instruction from the UI.
This works fine. If we now edit the diagram, and opt NOT to save the changes,
close it, and reopen it, the model is still present and so is at the state before closure. If we read the model in again from the DB, Hibernate throws an exception that there are 2 objects with the same DB id in the same session.
What we would really like to be able to do is return to the state before the
diagram was first loaded, with just the proxy for the diagram. iIe., forcibly make the model show the database data again.We have been
trying refresh() and evict() but get various hibernate errors.
I should say that after each DB operation we detach the objects from the
session and close the session, for return to the UI.
Any help on getting the right sequence of events would be very helpful.
Thank you!
Richard
|