-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: rename collections on reverse engineering
PostPosted: Tue Jun 02, 2009 9:26 am 
Newbie

Joined: Wed May 27, 2009 11:59 am
Posts: 10
Hi,
I'm using the eclipse reverse engineering tool, and I want to rename a collection property.

For example, I have DB table like:

Cat
----
id
name

Mouse
------
id
name

cats_dinner
---------
cat_id
mouse_id

foreign keys: cd_fk_cat_id : cat_id -> cat.id
cd_fk_mouse_id : mouse_id -> mouse.id

So, by default, the reverse engineering will insert a property named "Mouses" into the Cat class,
but I want it to set it to Mice

I tried inserting:

Code:
<table schema="public" name="cat">
        <foreign-key constraint-name="cd_fk_cat_id">
      <set property="mice"/>
   </foreign-key>
</table>


in the reveng.xml.

it didn't affect the program generated in anyway.


on the contrary, inserting
Code:
<table schema="public" name="cat">
        <foreign-key constraint-name="cd_fk_cat_id">
      <set exclude="true"/>
   </foreign-key>
</table>


would remove the "Mouses" property from the Cat class completely.


thanks,
Roee


Top
 Profile  
 
 Post subject: Re: rename collections on reverse engineering
PostPosted: Sat Jun 06, 2009 1:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if that is the *exact* schema you are using then it sounds like a bug.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: rename collections on reverse engineering
PostPosted: Sun Jun 07, 2009 1:31 pm 
Newbie

Joined: Wed May 27, 2009 11:59 am
Posts: 10
I don't really have cat and dog, but this is a translation..
I use eclipse Ganymede 3.4.2.

Well, I guess it is a bug...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.