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?
|