-->
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: Reverse Engineering DB2...help
PostPosted: Tue Jan 08, 2008 12:24 pm 
Newbie

Joined: Tue Jan 08, 2008 12:06 pm
Posts: 1
Hello all,
I developed an application with Hibernate and MySQL and now I have to migrate it to DB2, the problem is that the DB2 Server owner doesn't ALLOW foreign keys in their new tables...I can only create primary key constraints not foreign keys constraints.

So using the same mapping files (mapping sets with bi-dir many-to-many relationships, etc...) Hibernate does NOT retrieve the collections, it generates the correc SQL query but the property accessor for the collection always return an empty set...

Here's some code...

<hibernate-mapping>
<class name="htmlgenerator.pojos.Presentacion" table="TTLSBPTR" schema="TLSB">
<id name="idPresentacion" type="java.lang.String">
<column name="COD_MPAPRES" length="34" />
<generator class="uuid" />
</id>
<property name="descripcion" type="java.lang.String">
....
....

<set name="tqueries" table="TTLSBPQM" schema="TLSB">
<key column="COD_MPAPRES" not-null="false" />
<many-to-many class="htmlgenerator.pojos.Consulta" column="COD_MPAQUERY" />
</set>

....

So my question is, how I can write/generate mapping files without using foreign keys, how I can mapping the relations between objects/tablets????


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.