-->
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: Reverse Engineering and class inheritance
PostPosted: Tue Dec 06, 2005 12:11 pm 
Newbie

Joined: Wed Aug 24, 2005 1:43 pm
Posts: 10
Hi,
I am trying to reverse engineer a schema that has one table child with a primary key that is also a foreign key to another parent table. The generated classes and mapping don't use inheritance, only aggregation, i.e I get a Child class that has a method getParent() instead of extends Parent. I'd like to get inheritance but am not sure of what I need to configure to make this happen (if at all), and can't find any related info in the tools docs.
Thanks in advance,
Sebastien

Schema:
Parent table: Parent_Id primary key
Child table: Parent_Id primary key and foreign key to Parent table

Hibernate version: 3.0.5

Hibernate version: 3.1

Ant task:
<target name="generate" depends="compile" description="generate hibernate files">
<hibernatetool destdir="${src}">
<jdbcconfiguration configurationfile="${src}/hibernate.cfg.xml" packagename="***" revengfile="${src}/hibernate.reveng.xml" reversestrategy="***.ConvertStrategy" />
<hbm2java />
<hbm2hbmxml />
<hbm2cfgXml />
</hibernatetool>
</target>

Reverse Engineering file:
The file I have only use entries like
<table-filter match-schema="LZDBOD" match-name="***"/>
<table name="***"><column name="***" property="***" />


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 6:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
reverse engineering doesnt have any understanding of inheritance.

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