Hi all,
First of all, congratulations for this great piece of work that I am just beginning to fully appreciate.
I tried running a JDBC reverse engineering on our DB model, using Hibernate Tools 3.2beta8 (within Eclipse 3.2.1), with an Oracle 10g db (Oracle9Dialect).
I got a pretty good result, except a nasty error that breaks the start of the HibernateUtil, related to two tables with a join table between them (ManyToMany relationship):
_________________________________________________________
16:38:38,083 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ExceptionInInitializerError
at test.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:25)
[...]
Caused by: org.hibernate.AnnotationException: Illegal use of mappedBy on both sides of the relationship: test.model.Offer.globalOffers
at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:175)
at org.hibernate.cfg.annotations.CollectionBinder.bindCollectionSecondPass(CollectionBinder.java:1023)
at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:886)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:527)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:468)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1049)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:302)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205)
at test.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:20)
__________________________________________________________
I do understand that I should choose a "side" and not have mappedBy arguments on the two sides, but how can I configure it in the reveng.xml ?
I've browsed the web and forums, but I've not found any way to do it (:-((
Thanks for any help!
--Eric
|