Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
budoray
Post subject: mapping with catalog attribute  PostPosted: Jan 19, 2006 - 04:58 AM
Registered Member
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?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Jan 19, 2006 - 08:17 PM
Registered Member
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
budoray
Post subject:   PostPosted: Jan 19, 2006 - 08:32 PM
Registered Member
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).
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jan 19, 2006 - 09:45 PM
Moderator
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mostekcm
Post subject: Also interested in this  PostPosted: Jan 29, 2006 - 02:04 AM
Veteran Member
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.
 
 View user's profile Send private message  
Reply with quote Back to top
mostekcm
Post subject:   PostPosted: Jan 29, 2006 - 02:05 AM
Veteran Member
Veteran Member


Joined: Dec 20, 2005
Posts: 9

Just sending this note so I get notified of response.

Thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jan 29, 2006 - 08:27 AM
Moderator
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jan 31, 2006 - 05:07 AM
Moderator
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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits