It appears that <id> must be the first thing defined in a <class>,
then any <version> or <timestamp>, then the properties.  Seems a bit
arbitrary to me given the declarative nature of the mapping process.
Can't find this subtlety documented anywhere.  Is there a good
technical reason for not allowing me to order the sub-elements of
<class> as I see fit?

Example:

   <class name="Trade" table="trade">
      <id name="Id" column="id">
         <generator class="native"/>
      </id>
      <version name="Revision" type="timestamp" generated="always" />
      <property name="Data" column="data"/>
      <set name="Details" table="trade_details" lazy="false"
cascade="all">
        <key column="trade_id"></key>
        <one-to-many class="TradeDetail"/>
      </set>
   </class>

This works, but if you move <version> or <id> down below, it fails
with XmlSchema error: Invalid start element.

--

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