I have this map:
Code:
<class name="MyNameSpace.Core.User, MyAssembly" table="GETUSERS">
<id column="ID" name="_id" type="Int64" access="field">
<generator class="sequence" >
<param name="sequence">P_OID</param>
</generator>
</id>
<property name="_name" column="Name" type="string" length="50" access="field"/>
<property name="_password" column="Passwd" type="string" length="50" access="field"/>
<set name="Roles" table="USERS_ROLES" lazy="false">
<key column="IDUSER"/>
<many-to-many column="IDROLE" class="MyNameSpace.Core.Role, MyAssembly"/>
</set>
</class>
The property Roles is declared:
Code:
public RolesOfUser Roles
The class RolesOfUser implement Iesi.Collections.ISet but can't Load the User object. The exception is:
"The type NHibernate.Collection.Set can not be assigned to a property of type MyNameSpace.Core.RolesOfUser setter of MyNameSpace.Core.User.Roles"
Can i use my own class for "set" mapping ?
If not may be i nedd to work around a future.
Thanks.