-->
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: Foreign Key problem and Composite Key problem with rev eng
PostPosted: Thu Aug 14, 2008 12:35 pm 
Newbie

Joined: Thu Aug 14, 2008 12:16 pm
Posts: 1
I am using Eclipse Europa (3.3.2) and hibernate tools 3.2.3.GA and I am having two problems with reverse engeenering.

First problem is that I have two tables, PERSON and WEBUSER which has a primary key which is also a foreign key to PERSON. At my home computer I get a property person in WebUser class and webusers set property in Person class. At work I don't get a person property in WebUser class and that is the only one that I need. I can't find out why is this happening but I am suspecting that problem is somehow in the metadata read from a database. Although I used same methods for table creation at work and at home. I'm using DB2 database.

Second problem. I am using Generic exporter to generate DAO interfaces and classes. Problem is that one table has a composite key. I get a class that represents that key and that is good. Problem is that Generic exporters also make DAO interface and DAO class for that class. So I get these classes for example:

Webuser - I need
WebuserId - I need
WebuserDAO - I need
WebuserHibernateDAO - I need
WebuserIdDAO - I don't need
WebuserIdHibernateDAO - I don't need

Is there a way to stop these classes from generating?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 3:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use foreach="entity", the default is entity,component

_________________
Max
Don't forget to rate


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.