- This topic has 7 replies, 4 voices, and was last updated 19 years ago by
Brian Fernandes.
-
AuthorPosts
-
Daniel RayMemberI’m using 4.1M2 with MySQL 5..0.18 on Windows XP in this scenario.
database name: scribe
table: memberI’ve had problems with the latest MyEclipse release against Oracle 10g (https://www.genuitec.com/forums/topic/hibernate-relationships-incorrect-with-oracle-driver/&start=0&postdays=0&postorder=asc&highlight=) and decided to test the mappings against MySQL. Everything appeared to generate with the same outcome discussed in the above link. I ran my test cases and failed right off the bat. The error was that it could not find my table via scribe.scribe_member. So, I went back to comparing the mappings created by the 4.0 generator and found that I now have a catalog attribute.
My testcase passes if I remove the catalog attribute because the table can now be found. I don’t see how to NOT generate the catalog attribute and I’m back to manually editing each hbm file. What did I miss?
Riyad KallaMemberbudoray,
I took this to the hibernate team that is knee deep in preparing the 4.1 GA build but they said they would look into it and see if it’s possible to get a fix in.One of the devs commented that the catalog is intentional to provide a more accurate mapping, but you said it was causing Hibernate to bomb out totally. Do you have an error or stack trace you can provide that might help shed some light?
Daniel RayMemberI don’t have one at the moment (different machine). The error that I got was that the table ‘member’ was not mapped via scribe.scribe_member. I removed the catalog attribute and all was well. I tested this with Oracle 10g and I do NOT get the generated catalog attribute (I do get the schema filled in. No worries).
Brian FernandesModeratorDaniel,
4.1GA is due on Monday; while there hasn’t been the time to give you an ON/OFF switch for this issue, we will document a process that will make it easy for you to get what you want by modifying the template used for generation of the mapping files.
Best,
Brian.
mostekcmMemberI am also interested in not having search and erase all catalog=”XXXX” lines in my hbm.xml files.
I am fine with modifying templates if you can show me the workaround.
mostekcmMemberJust sending this note so I get notified of response.
Thanks.
Brian FernandesModeratorGuys,
We will release instructions on how to deal with this shortly. Stay tuned.
Brian.
Brian FernandesModeratorSorry for the delay.
Here is a set of templates that you can use for 4.1
http://www.myeclipseide.com/products/eworkbench/public-src/myeclipse_templates_4.1.0.zipPlease see the README.txt file in myeclipse_templates_4.1.0 folder for usage instructions.
The template you guys need to modify is hbm/persistentclass.hbm.vm
If you delete or comment out (using ##) lines 13-15 (shown below), the catalog attribute will not be generated.#if ($clazz.table.catalog) catalog="$clazz.table.catalog" #end
Let us know if you require further assistance.
Best,
Brian. -
AuthorPosts