gorm « Map « JPA Q&A





1. How to invalidate / refresh a domain instance association?    stackoverflow.com

There is a bug in Grails preventing me from using removeFrom* when the node I'm trying to remove is extending the collection type. Removing the node directly from the association won't ...

2. Grails/GORM Legacy DB One-to-Many mappedBy issue    stackoverflow.com

I have a legacy DB with rather simple structure. I have "rolls" that contain "rollTotals". Roll has a primary key of "rollID" and RollTotals have a composite key on "rollID" and "category". So ...

3. does it make sense to cascade "up" to owners in belongsTo relationship?    stackoverflow.com

  • I have a Skill class, which hasMany RoleSkills.
  • I have a RoleSkills class which belongsTo Role and Skill
  • I have a Role class which hasMany RoleSkills
For Role, I have a mapping that cascades ...

4. Grails Conversion from Hibernate XML to GORM    stackoverflow.com

I am migrating my grails project from using Hibernate XML to just GORM defined in the domain classes. In one prior XML file there is a map defined:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping ...

5. Stripping trailing whitespace from char fields in a legacy database with Grails GORM    stackoverflow.com

What are the possible solutions for stripping the trailing whitespace when mapping char fields in a legacy database? I see the following options:

  • Calling .trim() at the point of use (controller, view, etc)
  • Override ...

6. Gorm vs. Hibernate Mapping in Grails?    stackoverflow.com

I know that Gorm uses Hibernate under the covers to achieve what it does. As of yet I have not found a way to use the hibernate mapping strategy for ...

7. GORM Mapping Manifesto :: To Long or not to Long    stackoverflow.com

Fairly basic problem but it's roots run deep in the framework (and there is little definitive information on the subject), so I am putting it out here so as to save ...

8. Grails project: Gorm or JPA/Hibernate annotations for legacy db mapping?    stackoverflow.com

In a grails app, I have to create a bunch of grails domain classes mapped to a very old db. This very old db is using a lots of "funky" unreadable names ...

9. Grails GORM. Adding mappings to existing hibernate mappings    stackoverflow.com

I use grails with a legacy database, all hibernate classes and their mappings are packaged in a jar file and reside in the grails lib folder. Querying/updating/inserting with GORM works ok. Now ...





10. How to require value for certain column in Grails/GORM mapping?    stackoverflow.com

I have a grails application which works with a legacy database. I have in almost all tables a column, let's say include. I want to include such entities in query results if ...