The fix for http://helma.org/bugs/show_bug.cgi?id=251 in Rev. 1.104 was
actually a bit too simplistic. We do have to check the element name for non-relational objects after all. But all that was needed was to do it right, i.e. to check if parent.contains(this) before setting this to anonymous.
This commit is contained in:
parent
4cc4742d6c
commit
b6fb19c935
1 changed files with 4 additions and 4 deletions
|
@ -391,8 +391,7 @@ public final class Node implements INode, Serializable {
|
|||
// if subnodes are also mounted as properties, try to get the "nice" prop value
|
||||
// instead of the id by turning the anonymous flag off.
|
||||
long lastmod = Math.max(dbmap.getLastTypeChange(), lastmodified);
|
||||
if ((parentHandle != null) && (lastNameCheck < lastmod) &&
|
||||
(dbmap != null) && (dbmap.isRelational())) {
|
||||
if ((parentHandle != null) && (lastNameCheck < lastmod)) {
|
||||
try {
|
||||
Node p = parentHandle.getNode(nmgr);
|
||||
DbMapping parentmap = p.getDbMapping();
|
||||
|
@ -407,16 +406,17 @@ public final class Node implements INode, Serializable {
|
|||
anonymous = false;
|
||||
|
||||
// nameProp = localrel.propName;
|
||||
} else {
|
||||
} else if (!anonymous && (p.contains(this) > -1)) {
|
||||
anonymous = true;
|
||||
}
|
||||
} else if (!anonymous && (p.contains(this) > -1)) {
|
||||
anonymous = true;
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
// FIXME: add proper NullPointer checks in try statement
|
||||
// just fall back to default method
|
||||
}
|
||||
|
||||
|
||||
lastNameCheck = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue