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: Embeddable & Embedded
PostPosted: Mon Aug 03, 2009 6:55 am 
Newbie

Joined: Tue Jun 23, 2009 3:31 am
Posts: 10
I have User table & User Auth table. User table has user information & auth table just stores the last logged in date.

User configuration is defined in hbm file and we would like to use the facility provided by @Embeddable & @Embedded in xml configuration. Could someone explain how to do?

User table has
user id
first name
last name
password

User Auth table has
user id
last login date
login source

User Auth table does not have primary key so I cant use that as entity but I would like to use that as embedded object.


Top
 Profile  
 
 Post subject: Re: Embeddable & Embedded
PostPosted: Mon Aug 10, 2009 6:52 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Without a primary key, how do you map a given record of User to the User Auth table?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.