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: How to map a collection via a n-1, 1-n table?
PostPosted: Tue Jan 29, 2008 5:06 am 
Newbie

Joined: Tue Jan 29, 2008 4:47 am
Posts: 1
Hi

I have the following structure in my database:

[tblEntry]
id pk
typeID fk

[tblField]
id pk
typeid fk

[tblType]
id pk

And I want my classes to be composed like:

class Entry
property list Fields
property Type

How do I map the class Entry with its Fields. the relation is many-to-one from tblEntry to tblType and one-to-many from tblType to tblField.
I dont want Entry.Type.Fields[]

Thankful for any help!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 30, 2008 2:14 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
But it is Entry.Type.Fields[]. Having a fields collection on your Entry doesn't reflect the actual relationship. What are you trying to acheive?


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.