views:

1592

answers:

2

What is the reason of this error? My class is Course and it has notes. Mapping is as below. Any idea?

<bag name="Notes" table="NOTE" cascade="all">
      <key column="COURSEID"/>
      <one-to-many class="Server.Data.Note, Server.Data"/>
    </bag>
+3  A: 
<bag name="Notes" table="NOTE" cascade="all" inverse="true">
      <key column="COURSEID"/>
      <one-to-many class="Server.Data.Note, Server.Data"/>
    </bag>

inverse="true" solves my problem :)

NetSide
+2  A: 

I my case the reason was that I was mapping a list to an abstract type (during a refactoring). When I changed the class from being abstract, it worked.

TigerShark

related questions