Closed as not planned
Description
- Use upserts on Bs and only delete those not longer present
- have an attribute carrying change type information information
I think that the 1 st option must be default behavior or may be switched on by some annotation on Aggregate Root.
2 nd option may be must be behavior when developer define which row must be updated which insert and which must be deleted. May be similar to isNew function must be changeOperation(or changeType) function in child aggregate which must be implemented from some interfays(like Persistable) and return values as "INSERT", "UPDATE", "DELETE", "NONE"(means non operation must be performent on reference collection element).
Example:
class AgregateRoot implements Persistable{
.........
@UpdateStrategy("UPSERT")
Set<ChileAggregate> aggregate;
}
class ChildAggregate implements SomeInterface{
.......
public changeType(){
return "UPDATE";
}
}
Issue Links:
#210
DATAJDBC-210