Open lmouline opened 8 years ago
Yes at the moment the choice in KMF was to allow transparent refactoring (rename) of elements without errors, in particular because we never know if the key is already complet (sequence of call to setAttribute). Therefore, i will let this discussion open for two weeks in order to collect more feedback if any.
It might be useful to prevent creation
if there is already an item with the same index in the collection.
If one does not care about updating automatically, then KMF could provide an update
method. (or actually a createIfNone()
)
Anyway, if KMF express this concern in its DSL, it could be great.
Let us have a simple example :
If we create a person p1 (Name1,FirstName1) and after we create a person p2 (Name1,FirstName2). The second one will erase the first one, without any warning/error. So the
findAll
result will contain only p2.