-->
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: One class with attributes coming from different tables. How?
PostPosted: Wed Aug 06, 2008 11:55 pm 
Newbie

Joined: Wed Aug 06, 2008 11:42 pm
Posts: 2
Hi folks,

I've got to fix a system that uses hibernate, but I'm new to it, like 2 min or so ... but 'cause so new to it I'm even having trouble googling for help!
The current situation is the following:
There's 1 table A with cols a, b, c that generates a class A with attributes a,b, c.
How I need it to be:
There's table A with cols a, b, c and now there's table B with fields d (and other fields I don't care...) and I need to generate a class A with attributes a, b, c and d.
Note that I don't want to create a class B with attribute d and then associate B with A. I want to field d become an attribute of class A.

How can I accomplish that with Hibernate? Any help is welcome, even keywords to put up on google are :P


Thanks


Greg


Top
 Profile  
 
 Post subject: Join is the answer
PostPosted: Thu Aug 07, 2008 12:50 am 
Newbie

Joined: Tue Dec 07, 2004 8:15 pm
Posts: 10
Location: Adelaide Australia
I haven't done this but the following documentation may help:

http://www.hibernate.org/hib_docs/v3/re ... ation-join

_________________
Peter Kelley


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.