Hibernate version:
1.2.0 Alpha
A have two tables :
Table1:
id : pk
Table2:
id : pk
id_table2 :fk
Mapping Class1:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="BLL" namespace="BLL">
<class name="Class1" table="table1">
<id name="Id" column="id" type="Int32" unsaved-value="0">
<generator class="sequence">
<param name="sequence">Class1_id_seq</param>
</generator>
</id>
<bag
name="myList"
access="field"
inverse ="true"
cascade="all-delete-orphan">
<key column ="id_table2"></key>
<one-to-many class ="BLL.Class2,BLL" />
</bag>
</class>
</hibernate-mapping>
My cs
Code:
public class Class1 {
private IList<Class2> myList;
public virtual IList<Class2> MyList
{
get
{
return myList;
}
}
}
But I got the error:
ERROR: 42703: column mylist0_.filme_id does not exist
Help?