-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mapping SQL query to domain class
PostPosted: Tue Jan 16, 2007 3:58 pm 
Newbie

Joined: Tue Jan 16, 2007 3:43 pm
Posts: 4
Location: Lima PERU
Hi.

I want to map one table to many domain object. I think this is could be possible using SQL query.
It's possible to do this in hibernate ? I know this feature is possible in Ibatis.
But I searched in documents but I didn't find anything about it.

Regards in advanced.


Manuel Loayza
SCBCD, SCWCD


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 16, 2007 8:55 pm 
Regular
Regular

Joined: Sun Sep 17, 2006 2:48 am
Posts: 81
Location: California
If you are looking for polymorphic behavior, then you can read http://www.hibernate.org/hib_docs/v3/re ... nheritance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 2:29 am 
Newbie

Joined: Tue Jan 16, 2007 3:43 pm
Posts: 4
Location: Lima PERU
Friend.

It is not related to Multiple Inherintance.
By example
I have a table Person and the domain classes: NaturalPerson and JuridicPerson. The table Person contains data of these kind of person. The table Person has an attribute called kindPerson, the value 0 represents a Natural Person and value 1 represents Juridic Person. I know with Ibatis I can map a query to domain object. I repeat. Is this feature supported in Hibernate?

Regards.


Manuel Loayza
SCBCD, SCWCD


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 2:29 am 
Newbie

Joined: Tue Jan 16, 2007 3:43 pm
Posts: 4
Location: Lima PERU
Friend.

It is not related to Multiple Inheritance.
By example
I have a table Person and the domain classes: NaturalPerson and JuridicPerson. The table Person contains data of these kind of person. The table Person has an attribute called kindPerson, the value 0 represents a Natural Person and value 1 represents Juridic Person. I know with Ibatis I can map a query to domain object. I repeat. Is this feature supported in Hibernate?

Regards.


Manuel Loayza
SCBCD, SCWCD


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