-->
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: I have a mapping question (one to one).
PostPosted: Wed Oct 13, 2004 2:21 pm 
Newbie

Joined: Thu Apr 22, 2004 3:21 pm
Posts: 15
Hibernate version: NA
Mapping documents: NA
Code between sessionFactory.openSession() and session.close(): NA
Full stack trace of any exception that occurs: NA
Name and version of the database you are using: NA
The generated SQL (show_sql=true): NA
Debug level Hibernate log excerpt: NA

I have a mapping question. I have a schema that I can not change. It has a house table and a house_detail table. I want to map these two tables to one pojo. Is this possible? For example I have the data:

Code:
House
house_id   house_detail_id   house_name
     1            11           'Home'
     2            12           'Vacation Home'


Code:
House_Detail
house_detail_id     address
         11       123 Street
         12       522 Road


This should populate the pojo com.company.House class with the house_id, house_name and address.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 9:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Have a look at <joined-subclass>


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.