-->
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.  [ 2 posts ] 
Author Message
 Post subject: Composite key prevent generating POJO
PostPosted: Sat Jun 26, 2010 12:56 pm 
Newbie

Joined: Wed Nov 25, 2009 9:32 am
Posts: 7
I have table, that had an id, and two other columns. I could generate POJOs with no problem, but now I changed the scheme, and now I have the two columns (they are foreign keys), and the two columns are the primary key also. Now reverse engineering fails. It generates everything, except this one.
When I change back the scheme to have three columns, one ID, and two foreign keys, It's ok again. What am I missing?

I tried with both following reveng.xml file.
Code:
   <table catalog="mycat" schema="dbo" name="RoomUsers" class="RoomUsersBase">
      <primary-key>
         <key-column name="player" />
         <key-column name="roomID" />
      </primary-key>
   </table>

Code:
   <table catalog="mycat" schema="dbo" name="RoomUsers" class="RoomUsersBase">
   </table>

What am I missing?


Top
 Profile  
 
 Post subject: Re: Composite key prevent generating POJO
PostPosted: Sat Jun 26, 2010 1:13 pm 
Newbie

Joined: Wed Nov 25, 2009 9:32 am
Posts: 7
I found something interesting. When I add another column, it manges to generate, but I have a compositeID class. Why is that? What's the difference?
Is that possible, not to create a separate compositeID class?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.