apache / apache/grails-intellij-plugin
Hibernate classes referenced in grails-app/conf/hibernate/hibernate.cfg.xml (or any other defined Hibernate Facet) should be resolved as Domain Classes
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
Grails allows users to use traditional Hibernate mappings, or annotations mappings, by altering the dataSource.configClass property. When this is done, mapped Hibernate classes are automatically converted to Grails domain classes and behave exactly the same way as traditional domain classes with the following oddities:
1) They are usually in src/java instead of grails-app/domain
2) Constraints are defined in [className]Constraints.groovy – e.g. org.foo.Bar's constraints are in org/foo/BarConstraints.groovy
More details can be found at the following two URLs:
[http://grails.org/doc/1.2/guide/15.%20Grails%20and%20Hibernate.html](http://grails.org/doc/1.2/guide/15.%20Grails%20and%20Hibernate.html)
[http://www.grails.org/Validation](http://www.grails.org/Validation)
Note: We keep our domain classes in a Grails plugin referenced by our main applications; in a perfect world, they should be resolved in the dependent Grails applications as domain objects, also.
---
*Imported from [IDEA-51851](https://youtrack.jetbrains.com/issue/IDEA-51851) · Type: Feature · Votes: 5*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with grails-app/conf/hibernate/hibernate.cfg.xml and the other defined Hibernate Facets, then trace how classes in src/java are resolved compared with grails-app/domain. Check how [className]Constraints.groovy files map to those classes, including domain classes supplied by a Grails plugin. Done means mapped Hibernate classes and their constraints resolve as Grails domain classes in dependent applications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100