cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <nirvd...@gmail.com>
Subject Re: [suggestion] unmodifiable toMany lists
Date Wed, 11 Nov 2009 15:45:54 GMT
Sorry, I meant to simplify the remove call, but you get the idea.

-- 
Kevin

On Wed, Nov 11, 2009 at 10:44 AM, Kevin Menard <nirvdrum@gmail.com> wrote:

>
> The "problem" exists outside the context of an iterator, too.  What
> would you expect the semantics to be of the following?
>
> foo.allBars.remove(for.allBars.get(0));
>
> Should it just modify the in-memory list or should it represent the
> backing DB and represent a DELETE operation?
>
> It gets a little worse when you add your own custom collection methods
> (i.e., not DB backed) and it's not clear what type you're working
> with.
>
> Don't get me wrong, it's wholly a human problem.  But, false
> expectations can lead to tedious debugging sessions and adoptions of
> seemingly tenuous programming habits.
>
> --
> Kevin
>

Mime
View raw message