facebook

mapping with catalog attribute

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #244790 Reply

    Daniel Ray
    Member

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

    #244832 Reply

    Riyad Kalla
    Member

    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?

    #244833 Reply

    Daniel Ray
    Member

    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).

    #244834 Reply

    Brian Fernandes
    Moderator

    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.

    #245578 Reply

    mostekcm
    Member

    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.

    #245579 Reply

    mostekcm
    Member

    Just sending this note so I get notified of response.

    Thanks.

    #245584 Reply

    Brian Fernandes
    Moderator

    Guys,

    We will release instructions on how to deal with this shortly. Stay tuned.

    Brian.

    #245713 Reply

    Brian Fernandes
    Moderator

    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.

    
    #if ($clazz.table.catalog)
        catalog="$clazz.table.catalog"
    #end
    

    Let us know if you require further assistance.

    Best,
    Brian.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: mapping with catalog attribute

You must be logged in to post in the forum log in