Re: default value from the modeler ?

From: Michael Gentry (mgentr..asslight.net)
Date: Wed Apr 14 2010 - 10:37:35 EDT

  • Next message: Arnaud Garcia: "Re: default value from the modeler ?"

    Are you using Cayenne 2 or 3? What you did is fine for Cayenne 2, but
    in Cayenne 3 you can use a Callback method, too. Also, there is
    currently not a way in the modeler to set those initial values.

    mrg

    On Wed, Apr 14, 2010 at 8:28 AM, Arnaud Garcia <arnau..magemed-87.com> wrote:
    > Hello,
    >
    > Is it possible to add default values using the modeler ?
    >
    > if not, the good way is to overide the setPersistenteState ?
    >
    > thanks,
    >
    > arnaud
    >
    > public class SomeObjEntity extends _SomeObjEntity
    > {
    >  public void setPersistenceState(int state)
    >  {
    >    super.setPersistenceState(state);
    >
    >    // if the object was just created, set initial values
    >    if (state == PersistenceState.NEW)
    >    {
    >       // Set all initial values here
    >    }
    >  }
    > }
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 14 2010 - 10:38:35 EDT