Use Node constructor rather than createNode() in registerUser(). createNode()

is currently not prototype-aware, so if it is called on a persistent Node, the new
child node may be persisted with a bogus id (!).
This commit is contained in:
hns 2004-03-23 14:11:06 +00:00
parent 68c69d7ba1
commit 1271379eda

View file

@ -973,9 +973,8 @@ public final class Application implements IPathElement, Runnable {
return null; return null;
} }
unode = users.createNode(uname); unode = new Node(uname, "user", nmgr.safe);
unode.setPrototype("user"); users.setNode(uname, unode);
unode.setDbMapping(userMapping);
String usernameField = userMapping.getNameField(); String usernameField = userMapping.getNameField();
String usernameProp = null; String usernameProp = null;