79645133

Date: 2025-05-30 08:35:07
Score: 0.5
Natty:
Report link

I have confirmed the solution with the help of my architect.

version tag should always be after the id tag.

<hibernate-mapping namespace="Model" assembly="Model" xmlns="urn:nhibernate-mapping-2.2">
    <class name="Bar" lazy="true" table="`BAR`" schema="`dbo`">
        <id name="ID" access="property" column="`ID`">
            <generator class="assigned" />
        </id>
        <version name="Version" column="`VERSION`" type="int?" />

    </class>
</hibernate-mapping>

In our actual code.

We have this

<hibernate-mapping namespace="Model" assembly="Model" xmlns="urn:nhibernate-mapping-2.2">
    <class name="Bar" lazy="true" table="`BAR`" schema="`dbo`">
        <id name="ID" access="property" column="`ID`">
            <generator class="assigned" />
        </id>
        <property></property>
        <property></property>
         <property></property>
        <version name="Version" column="`VERSION`" type="int?" />

    </class>
</hibernate-mapping>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Edison C