[opencms-dev] DateLastModified -problem
Michael Emmerich
m.emmerich at alkacon.com
Tue Mar 7 10:34:30 CET 2006
Sami,
all methods on the CmsFile object, do only change the object in memory,
but not in the database. You have to write it back into the database,
before you want to read it again from there....
See the writeFile(CmsFile) method of the CmsObject.
Kind Regards,
Michael Emmerich
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
Sami Honkonen schrieb:
> I was writing an OpenCmsTestCase for an application when I ran into a
> problem with the last modified date of a file.
>
> I create a file and set it's last modified date. Then I read the same
> file and check it's last modified date, but it hasn't changed.
>
> I wrote a unit test to illustrate the problem. You can see it at
> http://pastebin.com/588514
> Can someone tell me how it's possible that the unit test fails?
>
> I didn't want to add this to Bugzilla since this seems like something
> that has to work and therefore it's probably just some simple mistake
> that I've overlooked. If you notice it, let me know.
>
More information about the opencms-dev
mailing list