When including a foreign key in a composite id, grails (rc1)
throws a org.hibernate.MappingException from
org.codehaus.groovy.grails.orm cfg.GrailsDomainBinder.java
line 531:
Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName() ).getValue().getColumnIterator();
because, I gather, the properties inside the composite id aren't returned
by org.hibernate.mapping.PersistentClass.getProperty().
I addressed this by editing GrailsDomainBinder.java to catch the MappingException and check for a composite id.
Attached are two domain classes that cause exception to be thrown when the grails application is started.
Also attached is the svn diff of my changes to GrailsDomainBinder.java . I hope it helps.