should baseopenmrsdata creator, dateCreated be not updatable

Hello there!

I wonder if the columns of

  • creator
  • dateCreated

of BaseOpenmrsData object should be made updatable=false

IMHO they should only be set on INSERT and shouldnt change after that.

see jpa docs for the annotation property http://docs.oracle.com/javaee/6/api/javax/persistence/Column.html#updatable()

let me know what you think :slight_smile:

I agree with you! :slight_smile:

created an issue for it: https://issues.openmrs.org/browse/TRUNK-4912

and while we are at it, what about the BaseOpenmrsObject.uuid should this also be updatable=false? I ran into this one, forgot to bind it to a jsp for one object and it was changing every time I saved the object. Not sure if thats desired in some cases or if this should also be prevented within the API?

The same also goes for uuid. Thanks for pointing this out. :slight_smile:

ticket for uuid https://issues.openmrs.org/browse/TRUNK-4914