So: -String.format doesn't help -declaring i at the start of the method doesn't help -i dont' have resharper installed, but I don't think the scope of i is the issue... -Yes, I agree that it has something to do w/ reflection and the way LINQ expressions are evaluated. Clearly i is being evaluated outside of the loop in ReflectionHelper. I read something about forcing LINQ evaluation using toArray(), but I cna't figure out the syntax for how I woudl invoke that in this scenario. -I think the fix may require a code change to Fluent, but if there are tricks or hacks i could use for now that would be much appreciated! Thanks for all your quick responses! Here's the stack trace FYI: Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject (String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance (String objectName, RootObjectDefinition objectDefinition, Object[] arguments) Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal (String name, Type requiredType, Object[] arguments, Boolean suppressConfigure) Spring.Objects.Factory.Support.AbstractObjectFactory.GetObject(String name) Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons () Spring.Context.Support.AbstractApplicationContext.Refresh() Spring.Context.Support.XmlApplicationContext..ctor(Boolean refresh, String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) Spring.Context.Support.XmlApplicationContext..ctor(String[] configurationLocations) Spring.Testing.NUnit.AbstractSpringContextTests.LoadContextLocations (String[] locations) Spring.Testing.NUnit.AbstractDependencyInjectionSpringContextTests.LoadContextLocations (String[] locations) Spring.Testing.NUnit.AbstractSpringContextTests.GetContext(Object key) Spring.Testing.NUnit.AbstractDependencyInjectionSpringContextTests.SetUp () FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() Swell.Common.SessionFactory.FluentNHibernateLocalSessionFactoryObject.PostProcessConfiguration (Configuration config) in C:\Documents and Settings\user\My Documents \Visual Studio 2008\Projects\Swell\src\Swell.Common\SessionFactory \FluentNhibernateLocalSessionFactoryObject.cs: line 97 Spring.Data.NHibernate.LocalSessionFactoryObject.AfterPropertiesSet() Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods (Object target, String name, IConfigurableObjectDefinition definition) Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject (String name, RootObjectDefinition definition, IObjectWrapper wrapper) Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject (String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) FluentNHibernate.TypeExtensions.InstantiateUsingParameterlessConstructor (Type type) FluentNHibernate.PersistenceModel.Add(Type type) FluentNHibernate.Cfg.FluentMappingsContainer.Apply(Configuration cfg) FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg) FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() T](Expression`1 expression) FluentNHibernate.Utils.ReflectionHelper.GetProperty[TModel] (Expression`1 expression) Map(Expression`1 expression, String columnName) b__0(DynamicComponentPart`1 c) in C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\Swell\src\Swell.Common \Conventions\TestMap.cs: line 29 DynamicComponent(PropertyInfo property, Action`1 action) DynamicComponent(Expression`1 expression, Action`1 action) Swell.Common.Conventions.TestMap..ctor() in C:\Documents and Settings \user\My Documents\Visual Studio 2008\Projects\Swell\src\Swell.Common \Conventions\TestMap.cs: line 54
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@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 -~----------~----~----~----~------~----~------~--~---