When a node accessed by secondary keys (accessname) is fetched but then found
by primary key in the cache, reset its create time to its lastmod time. Otherwise, Relation.checkConstraints will (rightly) reject it if a filter is defined for it, since it can't be sure that the filter constraint is still valid for the modified node.
This commit is contained in:
parent
4b945e9d72
commit
18926fb8e0
1 changed files with 3 additions and 0 deletions
|
@ -305,6 +305,9 @@ public final class NodeManager {
|
|||
Node oldnode = (Node) cache.put (primKey, node);
|
||||
// no need to check for oldnode != node because we fetched a new node from db
|
||||
if (oldnode != null && !oldnode.isNullNode() && oldnode.getState () != Node.INVALID) {
|
||||
// reset create time of old node, otherwise Relation.checkConstraints
|
||||
// will reject it under certain circumstances.
|
||||
oldnode.created = oldnode.lastmodified;
|
||||
cache.put (primKey, oldnode);
|
||||
if (!keyIsPrimary) {
|
||||
cache.put (key, oldnode);
|
||||
|
|
Loading…
Add table
Reference in a new issue