Menu

#289 Update date is wrong

V3.1
closed
Marco
None
1
2013-06-13
2013-06-12
Marco
No

As reported by Jaydev:
I am facing issue in Create Date & Last modified Dates in Itracker Issue Reports. Both are showing me same dates. The create dates also get changed when I change / modify any issue. The create dates also takes the date of Last Modified date when I modify any issues

Discussion

  • Marco

    Marco - 2013-06-12

    The issue seems to be caused by the Hibernate mappings.
    Since Hibernate seems to automatically recognize the first timestamp property in the mapping to be the modified timestamp to be always updated when the row changes (by setting the default to the value 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), the ordering of the fields must be changed to have the 'lastModifiedDate' field before the 'createDate' field.
    Not sure if this is documented clearly somewhere, found out accidentally reading a post it could be related to:
    http://stackoverflow.com/questions/2635046/set-creation-and-update-time-with-hibernate-in-xml-mappings
    referring to http://docs.jboss.org/hibernate/core/3.3/reference/en/html/mapping.html#mapping-declaration-timestamp

    Things to check:
    - Will it be applied on an existing table or must it be applied with a bug fix for the DDL?
    - Will it still work with an hsqldb?

     
  • Marco

    Marco - 2013-06-12
    1. The DDL will have to be migrated manually to make the timestamps work correctly when running on an existing itracker database.
    2. hsqldb will still work correctly with the new mappings
     
  • Marco

    Marco - 2013-06-13
    • status: open --> closed
     
  • Marco

    Marco - 2013-06-13

    The code for hibernate mappings has been fixed, there is also a migration SQL and a release-note on how to fix the issue.
    A new release is still pending.

     

Log in to post a comment.