Fixed bug in node validation: We did not check if group nodes are still contained
by their parents unless they use an accessname, which is often not the case.
This commit is contained in:
parent
3e278641a1
commit
c04096e65c
1 changed files with 6 additions and 5 deletions
|
@ -274,18 +274,19 @@ public final class NodeManager {
|
|||
if (node != null && node.getState() != Node.INVALID) {
|
||||
// check if node is null node (cached null)
|
||||
if (node.isNullNode ()) {
|
||||
if (node.created() < rel.otherType.getLastDataChange () ||
|
||||
node.created() < rel.ownType.getLastTypeChange())
|
||||
if (node.created < rel.otherType.getLastDataChange () ||
|
||||
node.created < rel.ownType.getLastTypeChange())
|
||||
node = null; // cached null not valid anymore
|
||||
} else if (!rel.virtual && !rel.usesPrimaryKey ()) {
|
||||
} else if (!rel.virtual) {
|
||||
// apply different consistency checks for groupby nodes and database nodes:
|
||||
// for group nodes, check if they're contained
|
||||
if (rel.groupby != null) {
|
||||
if (home.contains (node) < 0)
|
||||
node = null;
|
||||
// for database nodes, check if constraints are fulfilled
|
||||
} else if (!rel.checkConstraints (home, node)) {
|
||||
node = null;
|
||||
} else if (!rel.usesPrimaryKey ()) {
|
||||
if (!rel.checkConstraints (home, node))
|
||||
node = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue