cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Commented] (CAY-1807) Replace a Detached object with new one on a relationship throws NPE
Date Mon, 15 Apr 2013 11:46:16 GMT


Andrus Adamchik commented on CAY-1807:

Thanks for the JIra. May I ask for a few details:

1. Do you have a stack trace?
2. Was the detached object mentioned here NEW before it was deleted?
> Replace a Detached object  with new one on a relationship throws NPE
> --------------------------------------------------------------------
>                 Key: CAY-1807
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 3.0.1
>            Reporter: Manuel Sánchez
>            Priority: Minor
> In the following scenario:
> I deleted and persistent object (gets detached) which was used in a relationship
> I replaced it with a new one at the end of a relathionship
> Cayenne records an ArcDeletedOperation with the detached object involved and throws a
NPE when commiting.
> I solved the problem by disconecting the detached object from the relationship (set to
null) and then assigning the new one; in two steps
> Cayenne could check if its a detached object on that ArcDeletedOperation and say so instead
of throwing a NPE, or not recording any action, .. something more elegant than a NPE
> Thanks

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message