We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found something that looks like a gorm issue
I have this simple model
abstract class BaseDomain { User createdBy static constraints = { createdBy(nullable: false) } } class User extends BaseDomain { String userName User supervisor static constraints = { } static mappedBy = [ createdBy: null ] } class Data extends BaseDomain { String otherField }
If you look user it has this mappedBy closure
static mappedBy = [ createdBy: null ]
because I don't want to have createdBy mapped automatically to the user set in supervisor, we really have a listener to set it.
I need to know if the property createdBy is an association or not, so I do:
def app = Holders.getGrailsApplication() GrailsDomainClass dc = app.getArtefact(DomainClassArtefactHandler.TYPE, Data.name) assert dc.getPersistentProperty(propertyName).isAssociation()
It returns false when it should return true, if User has no mappedBy closure, it works fine
I have an application shared with this domain classes and a couple of tests cases to reproduce this error if you like use it
https://github.com/mvinas1977/gorm-association-issue
this happens in grails 2.5.6 I didn't test it in grails 3.3.x yet
The text was updated successfully, but these errors were encountered:
In grails 3.3.5 it works fine, so this only affects to grails 2.5.x
Sorry, something went wrong.
@mvinas1977 can you add also provide GORM and NEO4J-GROM versions.
@mvinas1977 please open it in GORM and list the env as well ... https://github.com/grails/grails-data-mapping
No branches or pull requests
I found something that looks like a gorm issue
I have this simple model
If you look user it has this mappedBy closure
because I don't want to have createdBy mapped automatically to the user set in supervisor, we really have a listener to set it.
I need to know if the property createdBy is an association or not, so I do:
It returns false when it should return true, if User has no mappedBy closure, it works fine
I have an application shared with this domain classes and a couple of tests cases to reproduce this error if you like use it
https://github.com/mvinas1977/gorm-association-issue
this happens in grails 2.5.6 I didn't test it in grails 3.3.x yet
The text was updated successfully, but these errors were encountered: