0

My hbm.xml file is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Project.Data.BusinessObjects" assembly="Project.Data">
  <class name="Project.Data.BusinessObjects.HSBom, Project.Data" table="[dbo].[HS_Bom]" lazy="true">
    <id name="Id" column="[bomID]">
      <generator class="assigned" />
    </id>
    <property name="BomPosition" column="[bomPosition]" />
    <property name="Quantity" column="[quantity]" />
    <property name="CreatedBy" column="[createdBy]" />
    <property name="CreatedAt" column="[createdAt]" />
    <property name="UpdatedBy" column="[updatedBy]" />
    <property name="UpdatedAt" column="[updatedAt]" />
    <many-to-one name="HSPartList1" column="[parentPartListId]" class="HSPartList" />
    <many-to-one name="HSPartList2" column="[childPartListId]" class="HSPartList" />
    <bag name="HSInstructions" table="[dbo].[HS_SubParts]" lazy="true" cascade="all" inverse="false" >
      <key column="[bomID]"></key>
      <many-to-many column="[sectionID]" class="HSInstruction" />
    </bag>
  </class>
</hibernate-mapping>

When I run my application am getting an error: Project.Data.HbmMaps.HSBom.hbm.xml(17,17): XML validation error: The 'column' attribute is not declared.

Whats is the issue with the mapping xml?

hazzik
  • 13,019
  • 9
  • 47
  • 86
Suja Shyam
  • 971
  • 2
  • 27
  • 57

1 Answers1

0

Looks like its an issue with the hbm file/files for the foreign key references in your file being treated as 'Content' resources rather than embedded resources. You can do the same by right clicking on the hbm file though your visual studio solution explorer and changing build action to 'embedded resource' from 'content' for the appropriate hbm files.

enter image description here