-->
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.  [ 1 post ] 
Author Message
 Post subject: Embedded list in same table - how to map
PostPosted: Tue Apr 28, 2015 12:53 pm 
Newbie

Joined: Tue Apr 28, 2015 12:40 pm
Posts: 1
Hello,
I have a table that represents vacations of a user. The table is non-normalized, and there is an embedded list in it. Each year, the user can breake his vacation in 1 to 3 periods. Each period have a beginning an end and a number of days. The talbe is like this (only important columns shown):

VACATION_TABLE:
USER_ID VARCHAR2(8)
BEGINNING_1ST_PERIOD DATE
END_1ST_PERIOD DATE
NUM_DAYS_1ST_PERIOD NUMBER(2)
BEGINNING_2ND_PERIOD DATE
END_2ND_PERIOD DATE
NUM_DAYS_2ND_PERIOD NUMBER(2)
BEGINNING_3RD_PERIOD DATE
END_3RD_PERIOD DATE
NUM_DAYS_3RD_PERIOD NUMBER(2)

I whant to map the periods as an embedded list in my Vcation entity. Is there a way to do that with Hibernate?

Thanks for any idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.