Grails

Add new implicit columns for date created and last updated

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 0.3, 0.4
  • Fix Version/s: 1.2-M3
  • Component/s: Persistence
  • Labels:
    None

Description

A date created and last updated column are frequently created. It would hence be useful if Grails created these for us and managed their state.

Activity

Hide
Marc Palmer added a comment -

I'm not so sure about this - in a great many cases these are not needed

Show
Marc Palmer added a comment - I'm not so sure about this - in a great many cases these are not needed
Hide
Jonathan Carlson added a comment -

This would never be required. Just an option. Someone suggested this on the Model bean: def autoTimestamps = true

Show
Jonathan Carlson added a comment - This would never be required. Just an option. Someone suggested this on the Model bean: def autoTimestamps = true
Hide
Sven Haiges added a comment -

We have timestamps in most of our models. As Jonathan said, this should not be automatically done for all domain classes, but only if you wish. def autoTimestamps = true if you need it sounds great.

Show
Sven Haiges added a comment - We have timestamps in most of our models. As Jonathan said, this should not be automatically done for all domain classes, but only if you wish. def autoTimestamps = true if you need it sounds great.
Hide
Marc Palmer added a comment -

See GRAILS-209 I believe this is the correct solution, aggregating a common class you create.

Show
Marc Palmer added a comment - See GRAILS-209 I believe this is the correct solution, aggregating a common class you create.
Hide
Graeme Rocher added a comment -

this is alraedy done

Show
Graeme Rocher added a comment - this is alraedy done

People

Vote (3)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: