I've raised an issue for this. http://code.google.com/p/fluent-nhibernate/issues/detail?id=267
On Tue, Jun 23, 2009 at 2:20 AM, rob <[email protected]> wrote: > > Figured out how to work around this issue for now... > > private Action<DynamicComponentPart<IDictionary>> mapping() > { > > int i = 0; > > return c => > { > for (i = 0; i < 10; i++) // number of categories > { > > > string propertyName = "category" + i > Expression<Func<IDictionary, object>> > expression = Expression.Lambda<Func<IDictionary, object>> > ( > Expression.Call(Expression.New(typeof > (Hashtable)), > typeof(IDictionary).GetProperty > ("Item").GetGetMethod(), > new Expression[] { Expression.Constant > (propertyName, typeof(string)) }), > new ParameterExpression[] > { Expression.Parameter(typeof(IDictionary), "dictionary") } > ); > c.Map(expression, propertyName); > } > } > }; > } > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
