| Author |
Message |
|
|
Post subject: mapping with catalog attribute
Posted: Jan 19, 2006 - 04:58 AM
|
|
Registered Member


Joined: Jan 20, 2004
Posts: 47
|
|
I'm using 4.1M2 with MySQL 5..0.18 on Windows XP in this scenario.
database name: scribe
table: member
I've had problems with the latest MyEclipse release against Oracle 10g (http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=10028&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? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 19, 2006 - 08:17 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
budoray,
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? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 19, 2006 - 08:32 PM
|
|
Registered Member


Joined: Jan 20, 2004
Posts: 47
|
|
I 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). |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 19, 2006 - 09:45 PM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2281
|
|
Daniel,
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. |
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Also interested in this
Posted: Jan 29, 2006 - 02:04 AM
|
|
Veteran Member


Joined: Dec 20, 2005
Posts: 9
|
|
I 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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 29, 2006 - 02:05 AM
|
|
Veteran Member


Joined: Dec 20, 2005
Posts: 9
|
|
Just sending this note so I get notified of response.
Thanks. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 29, 2006 - 08:27 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2281
|
|
Guys,
We will release instructions on how to deal with this shortly. Stay tuned.
Brian. |
_________________ Brian
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 31, 2006 - 05:07 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2281
|
|
Sorry 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.zip
Please 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.
| Code: |
#if ($clazz.table.catalog)
catalog="$clazz.table.catalog"
#end
|
Let us know if you require further assistance.
Best,
Brian. |
|
|
| |
|
|
|
 |
|
|