-
1. Re: Bidirectional associations and hierarchies
adamw Apr 28, 2010 4:32 PM (in response to hernanbolido)1 of 1 people found this helpfulHello,
that's most probably a bug.
Could you create a JIRA issue and attach the patch there, and assign it to me?
I'll apply the patch as soon as I get home (which hopefully won't involve any volcanoes this time )
Adam
-
2. Re: Bidirectional associations and hierarchies
adamw May 4, 2010 6:57 AM (in response to adamw)Did you maybe create a JIRA for that?
Adam
-
3. Re: Bidirectional associations and hierarchies
hernanbolido May 4, 2010 7:49 AM (in response to adamw)Hi Adam, welcome back!
Not yet! I´m working on it.
Hernán.
-
4. Re: Bidirectional associations and hierarchies
hernanbolido May 4, 2010 1:39 PM (in response to hernanbolido)Hi!
I've created the jira issue HHH-5195
I uploaded two patches, one containing the test cases and another with some modifications in CollectionMetadataGenerator.
Hope it will help.
Thanks. Hernán.
-
5. Re: Bidirectional associations and hierarchies
hernanbolido May 7, 2010 7:56 PM (in response to hernanbolido)I saw that the patch was commited.
Great! Thanks!
Hernán.
-
6. Re: Bidirectional associations and hierarchies
anshuiitk1 Jan 26, 2012 11:20 AM (in response to adamw)Hello Adam,
I get the similar error ,
Caused by: org.hibernate.MappingException: @AuditMappedBy points to a property that doesn't exist: x.y.EnityClass.auditMappedByProperty
but at a different point.
ClassesAuditingData.forcePropertyInsertable(ClassesAuditingData.java:83)
ClassesAuditingData.updateCalculatedFields() line: 69
EntitiesConfigurator.configure(Configuration, ReflectionManager, GlobalConfiguration, AuditEntitiesConfiguration, Document, Element) line: 84
AuditConfiguration.<init>(Configuration) line: 86
AuditConfiguration.getFor(Configuration) line: 99
CustomAuditEventListener(AuditEventListener).initialize(Configuration) line: 335
EventListeners$1.processListener(Object) line: 198
EventListeners.processListeners(EventListeners$ListenerProcesser) line: 181
EventListeners.initializeListeners(Configuration) line: 194
AnnotationConfiguration(Configuration).getInitializedEventListeners() line: 1396
AnnotationConfiguration(Configuration).buildSessionFactory() line: 1385
AnnotationConfiguration.buildSessionFactory() line: 954
Ejb3Configuration.buildEntityManagerFactory() line: 892
HibernatePersistence.createContainerEntityManagerFactory(PersistenceUnitInfo, Map) line: 74
I am using hibernate 3.5.6.
To me it doesnt explains, how could you, not get this error, but the error which Hernan reported.
This could only happen, if it was introduced in the later builds of 3.5.2 (where HHH-5191 is fixed), and Hernan still uses 3.5.2 and not the later builds where it is was introduced.
The reason I say this is because, If You see the Call Hierarchy of CollectionMetaDataGenerator.getMappedBy, it would collide on EntitiesConfigurator.configure at line number 100.
Whereas the error I get occurs much before in EntitiesConfigurator.configure at line number 84.
As a workaround, I could still not use auditmappedby annotation, and live with the assosiation table.
But, Please help provide a solution.
Thanks,
-
ClassesAuditingData.java.zip 1.4 KB
-
-
7. Re: Bidirectional associations and hierarchies
anshuiitk1 Jan 26, 2012 11:21 AM (in response to anshuiitk1)Hello Adam,
I just Attached the Modifed ClassesAuditingData.java file. This helps solve the problem I mentioned. Could this be accepted as a patch in 3.5.6 ?. Please let me know, the feedback on the patch.
Thanks,
Himanshu.
-
8. Re: Bidirectional associations and hierarchies
adamw Jan 31, 2012 3:17 PM (in response to anshuiitk1)There's no more development for the 3.5 branch unforutnately.
Adam
-
9. Re: Bidirectional associations and hierarchies
anshuiitk1 Jan 31, 2012 4:36 PM (in response to adamw)Hello Adam .. Thanks for the reply ..
I took a look at the source code of 4.0.1. It looks like the same problem would occur in the ClassesAuditingData.java. The problem would still prevail.
If you could confirm this to be a problem, then it is possible to track the issue on Jira. I have attached the ClassesAuditingData.java with my previous posting. It works well with my use case. May be, it could be accepted as a possible solution.
Please let me know.
-
10. Re: Bidirectional associations and hierarchies
adamw Feb 1, 2012 2:16 AM (in response to anshuiitk1)Can you try creating an Envers test case demonstrating the problem and attaching it to JIRA?
Adam