hawkwood,
That happens because of JOINs between two tables, where the right
table has more that one record for the item on the left table.
Have you tried distinct?
var ldossier = (from dos in
session.Linq<Dossier>().Expand("ListeLogicielDossier")
where dos.CodeDossier == "0114"
select dos).Distinct().ToList<Dossier>();
On Mar 23, 3:44 pm, Carlos cubas <[email protected]> wrote:
> Can someone replace all the "Dossier" stuff with "Animal" or something so I
> can read?
>
> -Carlos
>
> Practice makes perfect, but if no one is perfect, why practice?
>
>
>
> > Date: Tue, 23 Mar 2010 08:37:24 -0700
> > Subject: [nhusers] LinqToNhibernate, JOIN, Expand
> > From: [email protected]
> > To: [email protected]
>
> > Hi,
>
> > If i execute this :
>
> > var ldossier = (from dos in session.Linq<Dossier>()
> > join ldos in session.Linq<LogicielDossier>() on
> > dos.CodeDossier equals ldos.CodeDossier
> > where dos.CodeDossier == "0114"
> > select dos).ToList<Dossier>();
>
> > I have an exception "Join is not implemented", do you know when it
> > will be implemented ?
>
> > So, i have test with this syntax :
>
> > var ldossier = (from dos in
> > session.Linq<Dossier>().Expand("ListeLogicielDossier")
> > where dos.CodeDossier == "0114"
> > select dos).ToList<Dossier>();
>
> > In my "ldossier", i have two item of "Dossier" which are the same
> > instance of "Dossier", i have understand it's because i have two
> > "LogicielDossier" for my dossier, but why Nhibernate brings me back
> > twice my object "Dossier" ?
>
> > --
> > 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
> > athttp://groups.google.com/group/nhusers?hl=en.
--
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.