DATAJDBC-188 - Ensure proper behavior of delete logic.

No behavior changed.
Added tests on various levels for deleting entities with references to other entities.
This commit is contained in:
Jens Schauder
2018-03-19 08:34:12 +01:00
committed by Greg Turnquist
parent bd9b1ed301
commit 0460f2f509
4 changed files with 173 additions and 7 deletions

View File

@@ -94,6 +94,10 @@ public class JdbcMappingContext extends AbstractMappingContext<JdbcPersistentEnt
this.simpleTypeHolder = simpleTypes;
}
/**
* returns all {@link PropertyPath}s reachable from the root type in the order needed for deleting, i.e. the deepest
* reference first.
*/
public List<PropertyPath> referencedEntities(Class<?> rootType, PropertyPath path) {
List<PropertyPath> paths = new ArrayList<>();