What do you mean when you say that you can't generate the schema for this? I
don't quite follow.

I answered a pretty similar question to yours on stack overflow not too long
ago. Its for a case using strings instead of enums but I think it should be
straightforward to modify..

http://stackoverflow.com/questions/2254176/how-to-map-idictionarystring-entity-in-fluent-nhibernate



On Fri, Mar 5, 2010 at 3:10 PM, Felipe Leusin <felipe.leu...@gmail.com>wrote:

> Hi,
> I've been studying Fluent NHibernate lately and it's superb. But there
> is one situation that I simply can't get it to properly map:
>
> I have a Team entity with a TeamType Enum.
>
> I have a Player entity with a IDictionary<TeamType,Team> Teams list.
> This is so a player can have only one team per TeamType.
>
> I'm aware AutoMapping just won't work. And from what I read i should
> just create a mapping with:
>
> HasManyToMany<Team>(x => x.Teams)
>                .AsMap<TeamType>(x => x.TeamType, e => e.Type<Team>())
>                .Table("PlayerTeams");
>
> But I can't seem to generate the schema for this. Could I get some
> help? Should I just go to HBM to do this kind of mapping.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to fluent-nhibern...@googlegroups.com.
> To unsubscribe from this group, send email to
> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to