-->
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.  [ 4 posts ] 
Author Message
 Post subject: User constraints added to M:M table
PostPosted: Mon Jan 15, 2007 1:56 pm 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Hi,
I am using hibernate JPA with a legacy Oracle system.
M:M tables are used. I notice hibernate adds constraints to the columns of the M:M table.

This is evident when I issue the command:

SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'MYMMTABLE'

I do not wish hibernate to add these constraints to the M:M table, how do I turn this feature off?


Top
 Profile  
 
 Post subject: Update
PostPosted: Wed Jan 17, 2007 8:29 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Some update on this, I debugged through the start up.
In the class org.hibernate.cfg.Configuration and the method generateSchemaUpdateScript(), it loops through all tables, and then loops through all foreign keys for each table and then decides to add constraints for all the foreign keys.

I don't want constraints to be added, does anyone know how I can turn this feature off?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 7:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
hibernate.hbm2ddl.auto=none

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 22, 2007 7:41 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
emmanuel wrote:
hibernate.hbm2ddl.auto=none

thanks, I achieved that by removing this line altogether.
Good stuff.


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

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.