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

   - [x] Steps to reproduce provided
   - [x] Stacktrace (if present) provided
   - [x] Example that reproduces the problem uploaded to Github
   - [x] Full description of the issue provided (see below)
   
   ### Steps to Reproduce
   
   1. define a domain class `Dummy` with
   ```groovy
   static mapping = {
       version false
   }
   ```
   2. try to access `new Dummy().version` or check the entities' 
`persistentProperties`
   
   ### Expected Behaviour
   
   no version property is injected because of `version false`
   
   ### Actual Behaviour
   
   * a version property is injected and considered a persistent property.
   * `GormEntityTransformation` seems to injected it regardless of the verison 
mapping: 
https://github.com/grails/grails-data-mapping/blob/v6.1.10/grails-datastore-gorm/src/main/groovy/org/grails/compiler/gorm/GormEntityTransformation.groovy#L447-L454
   * but `PersistentEntity.isVersioned()` returns `false`
   * the actual db column is not created
   
   ### Environment Information
   
   - **Operating System**: win x64
   - **GORM Version:** 6.1.10
   - **Grails Version (if using Grails):** 3.3.6
   - **JDK Version:** oracle 8u151
   
   ### Example Application
   
   sample app will be referenced asap


-- 
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