I found this problem in mapping a composite id as foreign key in a one-to-many association:
here is my class with composite id:
this is in relation one-to-many with two other classes (which have pretty much the same code):
i get this error:
Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.InvalidPropertyException: No property found for name [attProgrs] for class [class IntCau]
so i insert the following declaration in the IntCau class:
and now the error became:
Invocation of init method failed; nested exception is org.hibernate.MappingException: Foreign key (FKE0C5693A41F5AA0A:att_progr [c1_int_cau, c2_int_cau, c3_int_cau,int_cau_c1,int_cau_c2,int_cau_c3])) must have same number of columns as the referenced primary key (int_cau [c1,c2,c3])
What's wrong? If i do the same on a class with simple foreign key all works! It's a bug?
I found a similar issue marked as resolved but my my problem still remain in new release 1.1
I also try to define the class in this way:
compiling is ok, but in the browser i found the same exception.
and now the problem is in columns mapping:
Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsDomainException: Error evaluating ORM mappings block for domain [AttProgr]: No such property: causale for class: GroovyObjectSupport_groovyProxy