[ http://jira.magnolia.info/browse/MAGNOLIA-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032#action_18032 ]
Gregory Joseph commented on MAGNOLIA-2377: ------------------------------------------ It could indeed be: see https://issues.apache.org/jira/browse/JCR-1396 which is fixed for 1.5 The issue doesn't show up for other types, since they are immutable (at least numbers strings boolean, it's not so clear for references and names) > Issue with getDate() > -------------------- > > Key: MAGNOLIA-2377 > URL: http://jira.magnolia.info/browse/MAGNOLIA-2377 > Project: Magnolia > Issue Type: Bug > Components: templating > Affects Versions: 3.5.4 > Reporter: Olivier Marti > Assignee: Gregory Joseph > > 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.magnolia.info/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ----------------------------------------------------------------