You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
Create a fresh app w/ groovy/GORM
Create a generic GORM domain class
Create a src/main/resources/application.groovy file w/ the following added:
import staticgrails.gorm.hibernate.mapping.MappingBuilder.orm
grails.gorm.default.mapping = orm {
id {
generator('org.hibernate.id.enhanced.SequenceStyleGenerator')
params([prefer_sequence_per_entity: true])
}
}
// or try it with a more traditional style...//grails.gorm.default.mapping = orm {// id([// generator: 'org.hibernate.id.enhanced.SequenceStyleGenerator',// params:[prefer_sequence_per_entity: true]// ])//}//grails.gorm.default.mapping = {// id {// generator = 'org.hibernate.id.enhanced.SequenceStyleGenerator'// params = [prefer_sequence_per_entity: true]// }//}
Expected Behaviour
The default mapping would be applied to the domain, and a sequence would be generated based on the domain classes name.
Actual Behaviour
When defining the mapping via the MappingBuilder DSL, it does not appear to ever be executed, and when defining the mapping using the traditional closure, it fails due to static type checking, e.g.
Script1.groovy: 19: [Static type checking] - Cannot find matching method Script1#id(groovy.lang.Closure). Please check if the declared type is correct and if the method exists.
Environment Information
Operating System: MacOS 10.15.7
Micronaut Version: 2.3.1
JDK Version: 11
The text was updated successfully, but these errors were encountered:
Task List
Steps to Reproduce
src/main/resources/application.groovy
file w/ the following added:Expected Behaviour
The default mapping would be applied to the domain, and a sequence would be generated based on the domain classes name.
Actual Behaviour
When defining the mapping via the MappingBuilder DSL, it does not appear to ever be executed, and when defining the mapping using the traditional closure, it fails due to static type checking, e.g.
Script1.groovy: 19: [Static type checking] - Cannot find matching method Script1#id(groovy.lang.Closure). Please check if the declared type is correct and if the method exists.
Environment Information
The text was updated successfully, but these errors were encountered: