Here are the mappings:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
        <class name="Cuyahoga.Core.Domain.Node, Cuyahoga.Core"
table="cuyahoga_node">
                <bag name="ChildNodes" cascade="delete" inverse="true" order-
by="position asc" lazy="true">
                        <cache usage="read-write" />
                        <key column="parentnodeid" />
                        <one-to-many class="Cuyahoga.Core.Domain.Node, 
Cuyahoga.Core" />
                </bag>
        </class>
</hibernate-mapping>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
        <class name="Cuyahoga.Core.Domain.Section, Cuyahoga.Core"
table="cuyahoga_section">
                <many-to-one name="Node" class="Cuyahoga.Core.Domain.Node,
Cuyahoga.Core" column="nodeid" />
        </class>
</hibernate-mapping>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
        <class name="Cuyahoga.Modules.Articles.Domain.Article,
Cuyahoga.Modules.Articles" table="cm_article">
                <many-to-one name="Section" class="Cuyahoga.Core.Domain.Section,
Cuyahoga.Core" column="sectionid" cascade="none" />
        </class>
</hibernate-mapping>

I removed the irrelevant properties for clarity.

Wolfgang, that didnt work. For some reason I got zero records back.
The query generated was:

select article0_.articleid         as articleid19_,
       article0_.updatetimestamp   as updateti2_19_,
       article0_.title             as title19_,
       article0_.summary           as summary19_,
       article0_.content           as content19_,
       article0_.dateonline        as dateonline19_,
       article0_.dateoffline       as dateoffl7_19_,
       article0_.inserttimestamp   as insertti8_19_,
       article0_.syndicate         as syndicate19_,
       article0_.sectionid         as sectionid19_,
       article0_.createdby         as createdby19_,
       article0_.modifiedby        as modifiedby19_,
       article0_.articlecategoryid as article13_19_
from   cm_article article0_,
       cuyahoga_section section1_
where  (section1_.nodeid in (select childnodes3_.nodeid
                             from   cuyahoga_node node2_,
                                    cuyahoga_node childnodes3_
                             where  node2_.nodeid =
childnodes3_.parentnodeid
                                    and ((node2_.nodeid = 1 /* @p0
*/)))
        and article0_.sectionid = section1_.sectionid)

I think the problem maybe the very last line, restricting the section.
--~--~---------~--~----~------------~-------~--~----~
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