-->
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: Table named messed when specifying 'catalog=mycat'
PostPosted: Mon Oct 10, 2005 2:34 am 
Newbie

Joined: Mon Oct 10, 2005 2:17 am
Posts: 1
So, this is about a problem I solved by trial and error, but I need to understand what happened.

The symptom: in the Hibernate generted SQL, there was an error, which resulted in MySQL reporting the table not being found.

The background:
- used Hibernate Tools to reverse engineer a few sample tables from MySQL test db.
- had class mappings like '<class name="mypkg.Customer" table="customer" catalog="mycat">...

Hibernate version:
3.0.5
Name and version of the database you are using:
MySQL 4.1
The generated SQL (show_sql=true):
select xxx from mycat_customer customer0_ where ...

After going through some of the postings here, somehow it occured to me that since this catalog value is optional in the class mapping, I thought I should see what I get without it. Well, it worked.

So, my question(s) would be:
1) What is the principle that makes Hibernate prepend the table name with the catalog value?
2) Is the Hibernate tool that made the mappings was wrong in creating this catalog value?

Thanks for anybody's comments in advance.
Karoly


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.