-->
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: Mapping two classes with inheritance
PostPosted: Thu Jan 08, 2004 5:44 pm 
Beginner
Beginner

Joined: Fri Nov 28, 2003 11:21 am
Posts: 49
Location: Buenos Aires, Argentina
Hi, I have this 2 classes:

class abstract ElemEdit {
int idElemEdit;
String nombre;
//And other attributes

//Getters and Setters Methods.
}

class Producto extends ElemEdit {
int idProducto;
Organizacion organizacion;
}

Also I have the two tables:

T_ElemEdit (int P_IdElemEdit, String A_Nombre, //And the other attributes).

T_Producto (int P_IdProducto, int F_IdOrganizacion)

my question is how should be the files xml for this two classes, considering that ElemEdit is an abstract class.
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 7:19 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
http://www.hibernate.org/hib_docs/refer ... nheritance

A normal table-per-class (ie. map with joined-subclass) mapping will work regardless of whether or not the base entity is abstract.

_________________
Cheers,
Shorn.


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.