-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3 with JPA/EJB3, tables across 2 persistence units
PostPosted: Tue May 06, 2008 4:42 am 
Newbie

Joined: Tue May 06, 2008 4:19 am
Posts: 6
I have a persistence.xml including two XA-Open enabled data sources for two different databasese. persistence-unit A has a table let's say tableA, whist persistence-unit B has a table tableB.
I set the hibernate.hbm2ddl.auto=validate for both persistence unit.

The problem is that when starting my application the Hibernate complains that the tableB is missing in persistence-unit A, the tableA is missing in persistence-unit B, as I see, this is really ridiculous and it seems that the hibernate validation process does not distinguish tables under different persistence unit at all.

To prove this, I tried to set hibernate.hbm2ddl.auto=update, then tableB is automatically created under my database A, whilst tableA is created under database B.

I deleted the redundant tables then set ibernate.archive.autodetection=false. Then everything went fine.

So, is this a bug of Hibernate? Any better idea?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.