-->
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.  [ 2 posts ] 
Author Message
 Post subject: Reverse Engineered Mappings & Catalog Attributes
PostPosted: Mon Apr 23, 2007 11:18 pm 
Newbie

Joined: Mon Apr 23, 2007 11:01 pm
Posts: 4
I am new to Hibernate, so please forgive me if I am not providing the right information in the right amount.

I am using the reverse engineering feature of hibernate to generate mappings and DOA's. However the mappings all contain a line like the following:

<hibernate-mapping>
<class name="somePackage.DoaClassName" table="tableName" catalog="yyXXyy">

I am wondering why yyXXyy is being put in for the catalog name and how I can control it. My database is MySQL using InnoDB. And as far as I know MySql does not support catalogs.

With this attribute set Hibernate will execute SQL like the following:

INSERT INTO yyXXyy.yyXXyy.tableName (col, col, col) values( val, val, val);

which errors quite nicely since it isn't proper syntax.

Note: it is worth mentioning that my user name and schema are the same string.

If I manually enter each mapping file in my class path, to not use catalog="yyXXyy then Hibernate will generate the correct SQL:

INSERT INTO yyXXyy.tableName (col, col, col) values( val, val, val);


I would preferably like to know:

1) Where this attribute is being fulled from (i.e. which cfg file)?
2) How can I turn it off or make this attribute an empty string?
3) If I am using a schema match filter of * (all) is there a setting that will propagate to all tables in the schema?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 11:56 pm 
Newbie

Joined: Mon Apr 23, 2007 11:01 pm
Posts: 4
Never mind, I will post this in the tools section as this seems to be a bug withing the Tools part of Hibernate.

An admin can delete this topic if they wish.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.