On Oct 3, 2007, at 8:40 PM, Robert A. Decker wrote:

I've looked through the API doc for CayenneDataObject but wasn't able to find what I'm looking for. Is there a method similar to eof's awakeFromInsertion?

I'm looking for a method that is called when a data object (in my case, a CayenneDataObject subclass) is inserted into a DataContext.

For what I'm doing I can probably get away with putting my code in the consructor for my class, but I'd rather put it in a method that's called automatically when the data object is inserted into a context.

Thanks,
R

In 3.0 you'd use lifecycle callbacks:

http://cayenne.apache.org/doc/lifecycle-callbacks.html

(still catching up with Modeler support, so there's some code involved in setting those up)

Andrus

Reply via email to