Here is the definition of the Roles in User class:
[HasMany( Table="Role" )]
public virtual IList<Role> Roles
{
get { return roles; }
}
On Sep 22, 7:05 pm, "Ken Egozi" <[EMAIL PROTECTED]> wrote:
> The exception message is very useful here (like in most parts of the Castle
> stack)
>
> "...please make sure you have specified the Table property..." - should work
>
>
>
> On Mon, Sep 22, 2008 at 6:58 PM, bdaniel7 <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I want to have this structure:
> > There are just few roles and i want to keep them as an enum. The
> > values should be kept in an association table, UserRoles, with id's of
> > users and roles.
>
> > public class User
> > {
> > ...
>
> > [HasMany( Table="Role" )]
> > public virtual IList<Role> Roles
>
> > ...
> > }
>
> > public enum Role
> > {
> > Employee,
> > ...
> > }
>
> > The current mapping is not working as I receive this:
>
> > "ActiveRecord tried to infer details about the relation User.Roles but
> > it could not find information about the specified target type Role. If
> > you have mapped a Dictionary of value types, please make sure you have
> > specified the Table property"
>
> > How can i map it?
>
> > Thanks,
> > Dan
>
> --
> Ken
> Egozi.http://www.kenegozi.com/bloghttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---