hi,
Simon Groenewolt wrote:
Kees Jongenburger wrote:
maybe we just need to remove the exception
I'll try that and let you know what happens...
Hmmm, just removing the exception in BasicNode.java gives no exceptions anymore, but no aliases either. And if you skip the whole else if (isnew) part like this:
public void createAlias(String aliasName) {
edit(ACTION_EDIT);
if (cloud instanceof Transaction) {
String aliasContext = BasicCloudContext.tmpObjectManager.createTmpAlias(aliasName, account,
"a" + temporaryNodeId, "" + temporaryNodeId);
((BasicTransaction)cloud).add(aliasContext);
// XXX Simon } else if (isnew) {
// XXX Simon throw new BridgeException("Cannot add alias to a new node that has not
been committed.");
} else {
if (!getNode().getBuilder().createAlias(getNumber(), aliasName)) {
Node otherNode = cloud.getNode(aliasName);
if (otherNode != null) {
throw new BridgeException("Alias " + aliasName + " could not be created. It is an alias for
" + otherNode.getNodeManager().getName() + " node " + otherNode.getNumber() + " already");
} else {
throw new BridgeException("Alias " + aliasName + " could not be
created.");
}
}
}
}
You'll get an exception: "The NODE field with name destination can not be NULL." -- probably because the getNumber() call returns null. (And that would be caused by the node not being committed yet...)
I'll use the 'workaround' for now.
Simon
