Remove Aggregate Root
10/27/25Less than 1 minute
Remove Aggregate Root
Normally, our savable only has the function of adding or modifying. By adding removeRoot, we can achieve deletion of the entire aggregate root.
//include query
try (Transaction transaction = easyEntityQuery.beginTransaction()) {
easyEntityQuery.savable(m8SaveRoot).removeRoot().executeCommand();
transaction.commit();
}removeRoot will set all navigation properties of the object to null, and then all navigations queried this time will be deleted.
Contributors
芥子-李显亮