On Aug 27, 2005, at 8:35 PM, Jerome Chan wrote:
> Would it be a good idea to put in hooks for when an object changes
> state?
Depends on what you are trying to accomplish. Overriding
CayenneDataObject.setPersistenceState(..) is useful for a number of
things, but if you want to make modifications that need to be
committed to the database, validateFor* should be a more appropriate
place.
> My other other solution is to subclass DataContext and perform my
> method call in commit changes instead. Less code for me to write. :P
I don't know the details of what you are trying to do, but there is
nothing wrong with such approach too.
Andrus
This archive was generated by hypermail 2.0.0 : Sat Aug 27 2005 - 15:41:16 EDT