These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Mapping set to own implementation of ISet
PostPosted: Fri Jun 23, 2006 11:59 am 
Contributor
Contributor

Joined: Tue May 30, 2006 1:25 am
Posts: 29
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.

_________________
Fabio Maulo.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.