sorry... which is your domain ?

2009/9/4 Lefty <[email protected]>

>
> Hi.  For that query, I would have to create a Culture entity and map
> it to DefaultCulture wouldn't I?
>
> I was hoping for a way to just get the value I was looking for,
> without creating a Culture entity.
>
>
>
> On Sep 4, 12:52 pm, Fabio Maulo <[email protected]> wrote:
> > select o.id, o.DefaultCulture.id, o.DefaultCulture.LCID from
> Organization o
> >
> > 2009/9/4 Lefty <[email protected]>
> >
> >
> >
> >
> >
> > > Getting started with NHibernate, and this has stumped me.  Consider
> > > these tables.
> >
> > > Organization
> > > ==========
> > > OrganizationId (PK)
> > > Name
> > > DefaultCultureId (FK)
> >
> > > Cultures
> > > ===========
> > > CultureId (PK)
> > > Name
> > > LCID
> >
> > > When I map the Organization entity, I would like to have these
> > > properties:
> >
> > > OrganizationId
> > > Name
> > > DefaultCultureId
> > > LCID  <== loaded from Cultures using the DefaultCultureId FK
> >
> > > where LCID is retrieved from Cultures, using the DefaultCultureId (FK)
> > > mapped to CultureId
> >
> > > I think I could create a Culture entity and have a Culture property,
> > > but I am trying to create a simple OrganizationDTO class with only the
> > > properties that the UI needs.
> >
> > > The closest I've come to getting this to work is with a <join> but
> > > that loads the incorrect culture (uses OrganizationId for lookup
> > > instead of the DefaultCultureId FK)
> >
> > > To me this is the simplest of joins, but NH seems to be making it
> > > difficult.
> >
> > --
> > Fabio Maulo
> >
>


-- 
Fabio Maulo

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