cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Menard" <kmen...@servprise.com>
Subject RE: Behavior of "remove(object)" on ToManyList
Date Wed, 30 May 2007 13:26:44 GMT
> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Wednesday, May 30, 2007 8:15 AM
> To: user@cayenne.apache.org
> Subject: Re: Behavior of "remove(object)" on ToManyList
> 
> ... and create its own set of problems. The data in memory is 
> a working copy of what you expect the database to look like 
> after you commit the transaction. And a very natural way of 
> changing the data model is to simply change the collection 
> that represents the relationship.
> 
> If you made the collection read-only, then the only way to 
> change the contents would be to make a working copy of the 
> read-only collection, change it, and then replace the 
> collection field in the domain object. So you're just trading 
> off one inconvenience for another.

Fair enough.  I guess I just never thought to manipulate the list
directly and initially expected it to work the same way that Alexander
had.  I wonder if others new to the framework do as well.

-- 
Kevin

Mime
View raw message