-->
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: Mapping question..
PostPosted: Fri Aug 18, 2006 12:14 am 
Newbie

Joined: Tue Aug 15, 2006 11:52 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1

I am trying to map tables such as these. Any hints on how this would map for select, update and delete

Table User:

userid (PK)
username
...

Table Relation

personId
connectionId
connectionDate
personId refers to User(userid)
connectionId refers to User(userId)
PK(personId,connectionId)


Table Invitation

inviterId
inviteeId
invitationDate
expiryDate
inviterId refers to User(userid)
inviteeId refers to User(userId)
PK(inviterId,inviteeId)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 10:02 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Have a look at section 23.3 of the refdocs. Your tables are like the LineItem table in that example, except with dates instead of the "quantity" property that the example uses.

_________________
Code tags are your friend. Know them and use them.


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.