-
1. Re: Hibernate + Groovy
epbernard Dec 12, 2007 8:20 AM (in response to trouby)oups, interesting. I don't really understand why we don't run into the problem when there is no inheritance.
I will try and catch guillaume to talk about how to solve that. -
2. Re: Hibernate + Groovy
trouby Dec 12, 2007 8:24 AM (in response to trouby)Sure,
Thank you for your answer Emmanuel,
Asaf. -
3. Re: Hibernate + Groovy
epbernard Dec 15, 2007 6:29 AM (in response to trouby)OK we found the issue.
In the first case (pure Groovy), the annotations are placed on the fields (always the case for Groovy) and metaClass is indeed a transient field thus ignored.
In the second case I suspect your java class has it's annotations on getters. So JPA expect to find annotations on getters and process getters of the Groovy class. Hence it picks getMetaClass, and incidentally does not read your annotations in Groovy (field instead of property).
The solution is to use field annotations for your superclass in Java. -
4. Re: Hibernate + Groovy
trouby Dec 15, 2007 6:52 AM (in response to trouby)Yeah, that is for sure the case, sounds good!
thanks.