thank you for your reply and the documentation link. But even with this I don't get it to work.
The transparent update needs a transaction to be started and then committed after the setter of an persisted object is called, right? My problem is that I have bound my persisted bean to a property editor which calls my setters automagically when changing associated values in my GUI component. There's no way (at least I know of) to do something before and after a value change.
I'm checking out ObjectDB as a thin replacement to hibernate, because I just want 2 simple beans to be persisted with CRUD operations. When I use hibernate I can initiate a transaction, feed my persisted object which may have changed for one or more fields to a call like "session.update(objectInstance)". I can commit the session afterwards and that's it. I mean I don't need to modify the object *within* the session, I can do it wherever and whenever I want and hibernate identifies the object by runtime polymorphism and finds the correspondent row in the DB by the matching and unique ID field.
Is there a similar option für ObjectDB? If I were unable to make myself clear, here's what I want in short:
- Load persisted instance from a DB (works).
- Assign the loaded object to my bean-editor which calls none, one or many updates via setters (works).
- When a save button is pushed, get the assigned object from the bean editor and save its current state to the db table/row it was initially loaded/created from.
Please tell me if this is possible and how I can achieve this.