cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kanwar Manish <kanwarman...@gmail.com>
Subject Re: PostAdd callback not working. configured in the modeler and overridden in the class as required.
Date Fri, 03 Aug 2012 05:37:39 GMT
Hi Everyone

Has anyone faced this problem before? I understand that in the prior
versions - we had to configure the Callbacks but in in Cayenne 3.1 B1 - the
callbacks are configured in the modeler itself.

I have checked the base class for the abstract declaration and I am
overriding it as well correctly in the subclass - see below.

I am really stuck on this one. Can someone share his/her experience?

Thanks
Kanwar Manish

On Thu, Aug 2, 2012 at 3:09 PM, Kanwar Manish <kanwarmanish@gmail.com>wrote:

> Hi Guys
>
> I have configured the onPostBack callback in the modeler and I am
> overriding it as below.
>
> "
>     public UUID getUserMasterUUID() {
>         return UUID.fromString(getUserMasterId());   }
>
>     public void setUserMasterUUID(UUID uuid)  {
>         setUserMasterId(uuid.toString());   }
>
>     @Override
>     protected void onPostAdd()  {
>         setUserMasterId(UUID.randomUUID().toString());    }
>     "
>
> However this doesn't seem to be working. Even after initializing the
> objects from the ObjectContext - there is no valid id in the objects - as
> if this onPostAdd is never called [debugger is not hitting the breakpoint
> inside onPostAdd()].
>
> "UserMaster um = oc.newObject(UserMaster.class);"
>
> Any thoughts on this?
>
> Thanks
> Kanwar Manish
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message