I was reading the nhibernate reference guide to figure out how to map a
table where a column is a certain value and i ran across this:5.1.3. class

You may declare a persistent class using the class element:

<class
        name="ClassName"                              (1)
        table="tableName"                             (2)
        discriminator-value="discriminator_value"     (3)
        mutable="true|false"                          (4)
        schema="owner"                                (5)
        proxy="ProxyInterface"                        (6)
        dynamic-update="true|false"                   (7)
        dynamic-insert="true|false"                   (8)
        select-before-update="true|false"             (9)
        polymorphism="implicit|explicit"              (10)
        where="arbitrary sql where condition"         (11)
        persister="PersisterClass"                    (12)
        batch-size="N"                                (13)
        optimistic-lock="none|version|dirty|all"      (14)
        lazy="true|false"                             (15)
/>


(11)

where (optional) specify an arbitrary SQL WHERE condition to be used when
retrieving objects of this class


My question is how do I use this? I've tried and I'm not sure that I'm using
it right.

Here is my mapping

  <class name="Class" table="MBR_GRP" where="GRP_TYP_CD = '12'">
    <id name="Id">
      <column  name="MBGP_KEY" />
      <generator class="native" />
    </id>

    <property name="Description" column="DESCRIPT" />

  </class>


-- 
Isaac Bailey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to