NHibernate "illegal access to loading collection" error

nhibernate-mapping

Solution

<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 :)

Problem

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> ```

Original source