polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: ManyAssociation.clear() & NamedAssociation.clear()
Date Sun, 23 Apr 2017 11:22:02 GMT
I am good with that?

On Sun, Apr 23, 2017 at 7:18 PM, Paul Merlin <paulmerlin@apache.org> wrote:

> Gang,
>
> I'd like to add these two methods:
>
> - ManyAssociation.clear()
> - NamedAssociation.clear()
>
> When we want to clear a ManyAssociation or a NamedAssociation today we
> have to iterate over it and remove each element.
> Having clear() methods would simplify code.
>
> We do that for example when updating an Entity as part of
> uow.toEntity(value)
> This would also help the EntityState implementations to do something
> cheaper than removing each element at a time.
>
> WDYT? Any objection?
>
> Cheers
>
> /Paul
>
>


-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message