-->
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: Unable to obtain relationship
PostPosted: Wed Apr 28, 2004 9:35 am 
Newbie

Joined: Tue Feb 24, 2004 9:15 am
Posts: 16
I am unable to see the relattionship when using Mysql with Middlegen-hibernate r-4 version with mysql-4.1.1a-alpha and three different jdbc drivers (mysql-connector-java-3.1.1-alpha,mysql-connector-java-3.0.11-stable,mysql-connector-java-3.0.10-stable)

I also double checked if the tables have relataionship, the two tables have the following relataionship:
ALTER TABLE lineitem ADD CONSTRAINT fk_lineitem_orders FOREIGN KEY(orderid) REFERENCES orders (orderid) ON DELETE NO ACTION ON UPDATE NO ACTION;

Anyone has any idea what I am doing wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 28, 2004 6:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I can see you have tried a few JDBC drivers. In my experience is almost always the driver and usually on the latest stable driver for the DB version operates the best.
It is the driver that provides the meta data so that the tables and relationships are present. Check that your constraints are in place and correct . The try the JDBC Driver(s) where maybe you will need to code a small Meta data testing program to see what is being returned.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 2:59 am 
Newbie

Joined: Tue Feb 24, 2004 9:15 am
Posts: 16
david wrote:
I can see you have tried a few JDBC drivers. In my experience is almost always the driver and usually on the latest stable driver for the DB version operates the best.
It is the driver that provides the meta data so that the tables and relationships are present. Check that your constraints are in place and correct . The try the JDBC Driver(s) where maybe you will need to code a small Meta data testing program to see what is being returned.


I figured out the problem after carefully reading Mysql manual that I need indexes for the relationships to work.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 10:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks for providing the solution discovered for your question. I will put the answer into the back of my mind as a suggestion for the future.


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.