I'm trying to add a reference but when I call node.getReferences() I can't see it.
I've tried creating a simple example -> create 2 nodes under root and reference one from the other. That works fine.
In my working code it doesn't. I'm guessing it's got something to do with versioning but I can' find any doc's explaining what's going on. Let me explain the structure
Root
|__project node
|
|__ node 1
|
|__ node 2
All nodes have mix:versionable and mix:referenceble.
Bit of code...
node1.checkout();
node2.checkout();
node2.setProperty("ref to node1", node1);
session.save();
if (!node1.getReferences().hasNext())
System.out.println("No references");
I've tried removing the checkout's and the save but all to no avail.
Any comments or recommended reading appreciated.
Ted.