Hi there,

Still new and still learning nHibernate as well as proper Domain Model
pattern.

I'm struggling with a concept here. I know how to design the database
but no sure how to map the classes to it, or even how to make the
correct classes for nHibernate OR the terminology with which to search
for solutions for my problem!

I could do it by hand but not using nHibernate.

The situation is as follows:

I have a many-to-many realtionship between a Horse entity and a Race
entity, and they are both mapped properly with many-to-many
relationships in both classes. The problem is that for each entry in
the HorseRaces table (join table) there are specific fields, ie: the
jockey and the position the horse came and the time etc. that can't be
held in either of the classes, but can only be determined by the
combination of the two!

How would I map this to classes with nHibernate? The only way I could
think of is to create a new object to hold these fields?

Please, any advice or best practices would be much appreciated. Would
hate to give up on nHibernate for this project now. I'm SURE there's a
'PROPER' way to do this?

Thank you in advance!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to