-
Bug
-
Resolution: Workaround exists
-
Major
-
3.5.4
-
None
It seems that for a Value in the repository of the value "Date" only one copy is existing in the memory, where all queries to it are referencing.
This is bad, in cases I want to manipulate the date (like compare today with a timespan from two weeks before till the actual value in the node).
That's what my code looks like:
Content activeNode= Resource.getLocalContentNode();
Calendar orig = activeNode.getNodeData("date").getDate();
System.out.println("orig: " + orig.getTime());
Calendar moduleDate = activeNode.getNodeData("date").getDate();
moduleDate.add(Calendar.DATE,-14);
System.out.println("modified: " + moduleDate.getTime());
Calendar reloaded = activeNode.getNodeData("date").getDate();
System.out.println("reloaded: " + reloaded.getTime());
Result:
orig: Wed Oct 15 14:30:00 CEST 2008
modified: Wed Oct 01 14:30:00 CEST 2008
reloaded: Wed Oct 01 14:30:00 CEST 2008
- depends upon
-
MAGNOLIA-2534 Upgrade to Jackrabbit 1.5
- Closed