-->
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: Views and HIBERANTE yet again...
PostPosted: Fri Apr 29, 2005 9:11 am 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Hello all, here's my problem.


I have a semi-complicated view on my DB. The view contains a couple left joins in it that denormalize about 4 tables. This view, being de-normalized, has several columns and there is no really PK (since views don't need PK)


The question is how do I map this view to Hibernate? Below is an example of what I mean...


BigView_view
employee ID
employee Name
courseTaken
courseID
dateCompleted
...



In the BigView_view an employee can take multiple courses, and he/she can also take a single course multiple times. This makes the composite key (emloyeeID, and coursesID) not unique.

So the key must be the composite of (employeeID, coursesID, dateCompleted). HOWEVER, since the view was created with left joins there is possibility that the courseID and dateCompleted could be null. Reason it can be is because I also want to see the employees who haven't taken certain courses.

HELLPPPPP... any would be grateful.

B


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.