codeconsole opened a new issue, #14508:
URL: https://github.com/apache/grails-core/issues/14508

   1. Decide on better naming strategy that is convenient and also concise and 
clear to understand.
   
   Convenient - minimal use of imports, ability to use default value of 
annotation
   Clear to Understand - projects a clear understanding of what the annotation 
is doing without having to read docs
   Concise - The annotation will most likely be used repeatedly multiple domain 
classes. It should not be overly verbose.
   
   2. Optimization - Use an AST transformation to accelerate runtime.   While 
still O(1), performance could be improved moving the annotation processing to 
compile time.   Performance would then be aligned with static constraints.
   
   3. Disable rendering of fields on edit/create page similar to dateCreated 
and lastUpdated
   
   
   Requires 2 or 3 imports:
   ```groovy
   class User {
   
       String username
       String password
   
       @AutoTimestamp(CREATED) LocalDateTime created
       @AutoTimestamp(UPDATED) LocalDateTime modified
   
       Date dateCreated
       Date lastUpdated
   }
   ```
   
   
   Decisions:
   1. What should be default behavior? Creation only or Update only?
   2. If Aliases are to be used, should constants be removed and replaced with 
a binary option? (true/false)
   3. If constants, are maintained, is there a more concise approach available? 
Rename EventType to Event?
   
   
   1 import:
   ```groovy
       @AutoTimestamp(AutoTimestamp.Event.CREATED) LocalDateTime created
       @AutoTimestamp LocalDateTime modified
   ```
   
   Middle ground?
   1 import:
   ```groovy
       @AutoTimestamp(AutoTimestamp.Type.DateCreated) LocalDateTime created
       @AutoTimestamp(AutoTimestamp.Type.LastUpdated) LocalDateTime modified
       @AutoTimestamp LocalDateTime updated // also works
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to