This issue would be (almost for sure) related to the doubled
mapping.
Check your mapping file for another place where the column="DocumentTypeId"
could be used
(or by some default convention as name="DocumentTypeId"
)
<!-- example of doubled mapping could be Int property representing the Int column -->
<property name="DocumentTypeId" column="DocumentTypeId" />
<many-to-one name="DocumentType" column="DocumentTypeId" class="DocumentType" />
The solution is easy here, one of these must be marked as readonly
<property name="DocumentTypeId" column="DocumentTypeId"
insert="false" update="false"/>
<many-to-one name="DocumentType" column="DocumentTypeId" class="DocumentType" />