Schema:
<hibernate-mapping>
<class name="Status" abstract="true">
<id name="Id">
<generator class="identity" />
</id>
</class>
<joined-subclass extends="Status" name="PrepareStatus">
<key column="id" on-delete="cascade" />
</joined-subclass>
<joined-subclass extends="Status" name="InServiceStatus">
<key column="id" on-delete="cascade" />
</joined-subclass>
<joined-subclass extends="Status" name="DisposeStatus">
<key column="id" on-delete="cascade" />
</joined-subclass>
</hibernate-mapping>
how can I write the criteria so I only query PrepareStatus?
this throws an error stating the sql is poorly formed
statuses = new string{ typeof(PrepareStatus).AssemblyQualifiedName }
repository.FindAll(Restrictions.InG("class", statuses));
if I change the string to an interger, the query execute without error
(although I haven't confirmed the results yet)
statuses = new string{ 1.ToString() }
repository.FindAll(Restrictions.InG("class", statuses));
this sort of makes sense because of the sql generated by criteria. Is
there a feature in NH which can translate this form me so I don't have
to hard map the integer produced in sql to the types defined in my
domain?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---