polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <paulmer...@apache.org>
Subject ManyAssociation.clear() & NamedAssociation.clear()
Date Sun, 23 Apr 2017 11:18:59 GMT
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


Mime
View raw message