What version of NHibernate is this?

On Mon, Jul 18, 2011 at 11:59 AM, Tuncer Karaarslan <[email protected]> wrote:
> Hi. outer-join option put into
> the class-level mapping. outerjoin true for many-to-one, I'm
> doing. CreateQuery process moves down queries. However, the sentences are
> written with linq queries coming down as innerjoin. There
> are examples below.Unwillingness to proceed with Linq, but I can
> not keep any inconvenience. Urgent, please help.
> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
> assembly="SalesManagement.Entity"
>                    namespace="SalesManagement.Entity.Cari" >
>   <class name="Personel" table="Personel" entity-name="Personel" lazy="true"
> schema="dbo">
>     <id name="Id" column="Id" type="Int64" unsaved-value="0">
>       <generator class="identity" />
>     </id>
>     <many-to-one name="BagliDepartman" column="BagliDepartman"
> cascade="none" entity-name="Departman" lazy="proxy" outer-join="true" />
>     <property name="Adi" column="Adi" length="100" lazy="true" />
>     <property name="Soyadi" column="Soyadi" length="100" lazy="true" />
> ...
> linq query
> var xxx= _servicePersonel.GetAll().Select(q=>new
> Models.Cari.Personel.PersonelListe
>                                           {
>                                               Id = q.Id,
>                                               Adi = q.Adi,
>                                               Soyadi = q.Soyadi,
>                                               BagliDepartman_Bilgisi =
> q.BagliDepartman_Bilgisi
>                                           }).Take(5).ToList();
>
> linq result:
> select TOP ( 5 /* @p0 */ ) personel0_.Id             as col_0_0_,
>                    personel0_.Adi            as col_1_0_,
>                    personel0_.Soyadi         as col_2_0_,
>                    personel0_.BagliDepartman as col_3_0_,
>                    departman2_.Adi           as col_4_0_,
>                    departman1_.Id            as Id5_,
>                    departman1_.BagliSirket   as BagliSir2_5_
> from   dbo.Personel personel0_
>        inner join dbo.Departman departman1_
>          on personel0_.BagliDepartman = departman1_.Id,
>        dbo.Departman departman2_
> where  personel0_.BagliDepartman = departman2_.Id
> Thanks, Tuncer
>
> --
> 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.
>

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