Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to map two tables in just one class.
PostPosted: Thu Dec 15, 2011 5:02 pm 
Newbie

Joined: Thu Dec 15, 2011 4:55 pm
Posts: 1
create table Person(
Id int primary key,
Code int not null,
Birday date not null
);

create table Address(
Code int not null, // composite primary key
Birday date not null, // composite primary key
LastName varchar(25)
);


Top
 Profile  
 
 Post subject: Re: How to map two tables in just one class.
PostPosted: Thu Dec 15, 2011 5:11 pm 
Newbie

Joined: Thu Dec 15, 2011 4:53 pm
Posts: 3
Hi,

just search for @Embedded - its standard for at least v3.5 hibernate.

have fun.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.