Hi Joel,

What version of Cayenne are you using?  If 3.0, you'll probably want
to use a callback.  If 2.0, use setPersistenceState.  For 3.0, you'd
be interested in the PostAdd callback:

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

Configure the callback in Cayenne Modeler with a name such as
"onPostAdd" and then in your Java:

  @Override
  protected void onPostAdd()
  {
      ...
  }

mrg



On Thu, Sep 8, 2011 at 11:03 AM, Becker, Joel <[email protected]> wrote:
>
>
> https://cwiki.apache.org/CAY/setting-initial-values.html says "the best
> place to set default/initial values in the newly created object is in
> the setPersistenceState". Is there a problem with setting the default
> values in a default constructor (following java general best practices)?
>
>

Reply via email to