HasMany(x => x.Ids) should do the trick. Does it not?

On 8 Sep 2010, at 21:30, kimsk112 <karl...@gmail.com> wrote:

> Firstly, I just want to thank anyone who contributed to the project. I
> really appreciate your effort.
> 
> I just downloaded the build #692, and I am trying to update my code to
> be compliant with new Dictionary Mapping.
> 
> Here are my classes:
> 
> public class Person
> {
>   ...
>   public virtual IDictionary<string, Identification> Ids {get;set;}
> }
> 
> public class Identification
> {
>   public virtual string Type { get; set; }
>   public virtual string Value { get; set; }
> }
> 
> 
> My current mapping is below:
> 
> public class PersonMap : SubclassMap<Person>
> {
>        public PersonMap()
>        {
>             ...
>             HasMany<Identification>(x => x.Ids)
>                .AsMap<string>(x => x.Type)
>                .Cascade.AllDeleteOrphan()
>                .NotFound.Ignore();
>             ...
>         }
> }
> 
> public class IdentificationMap : SubclassMap<Identification>
>    {
>        public IdentificationMap()
>        {
>            Table("IDENTIFICATION");
>            Map(x => x.Value)
>                .Not.Nullable();
>            Map(x => x.Type);
>        }
>    }
> 
> 
> How should I map them with the new Dictionary Mapping?
> 
> Thanks,
> Karlkim
> 
> 
> -- 
> 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.
> 

-- 
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