Hello !
I'm running cayenne 1.2Beta in both 3t and "classic" mode.
I would like to have some kind of trigger running on server, when
saving a new record, when saving an existing one and when deleting a
record. ValidateForSave/Update/Delete method seems to be a perfect.
But :
1. When I want to create records with no direct relationship.
For example, if I would have a Log table where I put all logs about
records created/modified/deleted and in each log I would like to save
modified object PK. ValidateForSave is not right place to do so,
because for new objects there is only temporary PK. For the time
being I'm overriding setPersistenceState(), and after persistence
state is changed from new to committed I have the PK, but I don't
like this solution too much. Any advise ? (I haven't look in to
transactions yet, would that help ?)
2. When I want to create records with true relationship
When I'm saving a record on client, and then during validateForSave
on server try to add some new records and relationships I'm getting
ConcurrentModificationException, which I believe is related to the
fact that relationship is modified or new objects are added to the
context. I'm I right ? I'm I allowed to modify relationship on server
after receiving them from client ?
Regards
Marcin
-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
This archive was generated by hypermail 2.0.0 : Tue May 23 2006 - 03:55:39 EDT