Hi,

I am kind of new to nhibernate and would like to do something that
should be rather simple, but I am not finding anything on how to do
it. I know this is possible to do in other ORM's but I would like to
use nhibernate to do this:

Imagine I have a route defined by several segments in a certain order.

Lets make it simple and have 3  tables in my DB:

Routes:
- id_route
- route_name

Segments:
- id_segment
- segment_name
- begin_point
- end_point

and the auxiliar table:
RouteSegment:
- id_route
- id_segment
- order

But now in my object world I only want to have only two classes: Route
and Segment.
And my Route class should have a ordered list of the segments I want.

As far as I have read this is not possible and I should use another
auxiliar class and make it a one to many relashionship, but this is
not what I want, and I've seen this in other ORM's.

Do you know how can I do it in nhibernate? In particular the mapping
of the tables.


--~--~---------~--~----~------------~-------~--~----~
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