Cris,
Maybe I still need more coffee, but could you explain one more time
the initial problem you were trying to solve with the transient
property approach?
Andrus
On Sep 28, 2005, at 9:31 AM, Cris Daniluk wrote:
> I'm writing a small webapp that binds the objects directly to forms -
> for the most part, its working great, but I'm having a bit of trouble
> maintaining a many-to-many relationship across a flattened table with
> a multi-select box. Because the framework doesn't know a removed
> relationship from omitted data, and because it will happily readd the
> same one a thousand times, I had to hack around a little.
>
> Basically, I added a separate property in the wrapper object to store
> the list of related objects outside of Cayenne, move the persistence
> state to MODIFIED, and then use a validateOnInsert() method to re-sync
> the transient property with the Cayenne property. Unfortunately,
> Cayenne is outsmarting me - because the snapshots have not changed,
> commitChanges() reverts to COMMITTED.
>
> Is there a way I can force Cayenne to attempt to commit this object?
> Or, better, a native way to take a NEW list of objects in a
> relationship and have Cayenne decide what should be tossed and what
> should be kept...
>
> Thanks,
>
> Cris
>
>
This archive was generated by hypermail 2.0.0 : Wed Sep 28 2005 - 10:35:09 EDT