getRootNode(): Set DbMapping and prototype name to app.getRootMapping()
This commit is contained in:
parent
0eb623afd5
commit
e284f39be5
1 changed files with 8 additions and 2 deletions
|
@ -101,8 +101,14 @@ public final class NodeManager {
|
||||||
* Gets the application's root node.
|
* Gets the application's root node.
|
||||||
*/
|
*/
|
||||||
public Node getRootNode() throws Exception {
|
public Node getRootNode() throws Exception {
|
||||||
DbKey key = new DbKey(app.getRootMapping(), app.getRootId());
|
DbMapping rootMapping = app.getRootMapping();
|
||||||
return getNode(key);
|
DbKey key = new DbKey(rootMapping, app.getRootId());
|
||||||
|
Node node = getNode(key);
|
||||||
|
if (node != null && rootMapping != null) {
|
||||||
|
node.setDbMapping(rootMapping);
|
||||||
|
node.setPrototype(rootMapping.getTypeName());
|
||||||
|
}
|
||||||
|
return node;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Checks if the given node is the application's root node.
|
* Checks if the given node is the application's root node.
|
||||||
|
|
Loading…
Add table
Reference in a new issue