Created
March 25, 2011 07:11
-
-
Save kkozmic/886473 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this gets executed */ | |
SELECT this_.Id as Id0_0_, | |
this_.Author as Author0_0_, | |
this_.Title as Title0_0_, | |
this_1_.Comment as Comment1_0_, | |
this_1_.LanguageId as LanguageId1_0_ | |
FROM [Blog] this_ | |
inner join Comment this_1_ | |
on this_.Id = this_1_.Blog_id | |
WHERE (this_.LanguageId = 2 /* @p0 */) | |
/* this should be executed */ | |
SELECT this_.Id as Id0_0_, | |
this_.Author as Author0_0_, | |
this_.Title as Title0_0_, | |
this_1_.Comment as Comment1_0_ | |
FROM [Blog] this_ | |
inner join Comment this_1_ | |
on this_.Id = this_1_.Blog_id | |
WHERE (this_1_.LanguageId = 2 /* @p0 */) | |
/*this is my mapping:*/ | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" auto-import="true" default-cascade="none" default-lazy="true"> | |
<class xmlns="urn:nhibernate-mapping-2.2" mutable="true" name="NHibernateActivationExperiment.Blog, NHibernateActivationExperiment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" table="`Blog`" | |
where="LanguageId=:blogcomment.languageId"> | |
<id name="Id"> | |
<generator class="identity" /> | |
</id> | |
<property name="Author" /> | |
<property name="Title" /> | |
<join table="Comment"> | |
<key > | |
<column name="Blog_id" /> | |
</key> | |
<property name="Comment" /> | |
<property name="LanguageId" access="noop" type="int" insert="false" update="false" /> | |
</join> | |
</class> | |
</hibernate-mapping> | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" auto-import="true" default-cascade="none" default-lazy="true"> | |
<class xmlns="urn:nhibernate-mapping-2.2" mutable="true" name="NHibernateActivationExperiment.Comment, NHibernateActivationExperiment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" table="`Comment`"> | |
<id name="Id"> | |
<generator class="identity" /> | |
</id> | |
<property name="Body" length="500" /> | |
<property name="Published" /> | |
<property name="LanguageId" /> | |
<many-to-one cascade="save-update" class="NHibernateActivationExperiment.Blog, NHibernateActivationExperiment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Blog"> | |
<column name="Blog_id" /> | |
</many-to-one> | |
</class> | |
</hibernate-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment