cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Huss (Commented) (JIRA)" <>
Subject [jira] [Commented] (CAY-1625) Transient objects do not work in ROP apps
Date Tue, 04 Oct 2011 20:25:34 GMT


John Huss commented on CAY-1625:

Hmm.  I actually have transient objects working completely on the server in my project.  They
can be used outside of an ObjectContext and then later be added to an ObjectContext and saved.
 My entities are PersistentObject subclasses with a custom template that initializes the relationship
fields if needed (as attached), and includes calls to objectContext.propertyChanged in the
accessors in the same way CayenneDataObject does before setting the value.  

So it looks like the propertyChanged call is necessary too - I've revised the attached template
accordingly and I'm re-attaching it.
> Transient objects do not work in ROP apps
> -----------------------------------------
>                 Key: CAY-1625
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: ROP
>    Affects Versions: 3.1M4
>         Environment: Mac 10.6
>            Reporter: John Huss
>            Priority: Minor
>              Labels: patch
>         Attachments: client template transient.txt
>   Original Estimate: 72h
>  Remaining Estimate: 72h
> In addition the problem referenced in CAY-1624, transient objects don't work when using
ROP because in the client template the relationship values (to-one and to-many) are   null
and are only initialized to non-null values when they are added to an ObjectContext.  By modifying
the template to initialize the relationship values to something non-null, transient objects
can be worked with locally (but not still saved?).  I don't know if that is the best solution,
but here's basically what I did.

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


View raw message