2010-06-02 6 views
0

예외에 대해 꽤 차단되었습니다.Monorail Excpetion, "주어진 키가 사전에 없습니다."

활성 레코드와 모노레일을 사용하고 있습니다. 새로운 모델을 추가 할 때까지 모노레일에있는 비계 컨트롤러를 사용할 수있었습니다. 예함으로써 http://bitbucket.org/mariocesar/mangos/src

, 나는 어떤 관계를 추가 할 때까지 ProductsController가있다, 작동 Inventory.Product 모델에 대한 : 여기

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 
at System.Collections.Generic.Dictionary`2[System.String,NHibernate.Mapping.PersistentClass].get_Item (System.String key) [0x00000] 
at NHibernate.Cfg.Configuration+Mapping.GetPersistentClass (System.String className) [0x00000] 
at NHibernate.Cfg.Configuration+Mapping.GetIdentifierType (System.String className) [0x00000] 
at NHibernate.Type.EntityType.GetIdentifierType (IMapping factory) [0x00000] 
at NHibernate.Type.EntityType.GetIdentifierOrUniqueKeyType (IMapping factory) [0x00000] 
at NHibernate.Persister.Entity.AbstractPropertyMapping.InitIdentifierPropertyPaths (System.String path, NHibernate.Type.EntityType etype, System.String[] columns, IMapping factory) [0x00000] 
at NHibernate.Persister.Entity.AbstractPropertyMapping.InitPropertyPaths (System.String path, IType type, System.String[] columns, System.String[] formulaTemplates, IMapping factory) [0x00000] 
at NHibernate.Persister.Entity.AbstractEntityPersister.InitOrdinaryPropertyPaths (IMapping mapping) [0x00000] 
at NHibernate.Persister.Entity.AbstractEntityPersister.InitPropertyPaths (IMapping mapping) [0x00000] 
at NHibernate.Persister.Entity.AbstractEntityPersister.PostConstruct (IMapping mapping) [0x00000] 
at NHibernate.Persister.Entity.SingleTableEntityPersister..ctor (NHibernate.Mapping.PersistentClass persistentClass, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory, IMapping mapping) [0x00000] 
at NHibernate.Persister.PersisterFactory.CreateClassPersister (NHibernate.Mapping.PersistentClass model, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory, IMapping cfg) [0x00000] 
at NHibernate.Impl.SessionFactoryImpl..ctor (NHibernate.Cfg.Configuration cfg, IMapping mapping, NHibernate.Cfg.Settings settings, NHibernate.Event.EventListeners listeners) [0x00000] 
at NHibernate.Cfg.Configuration.BuildSessionFactory() [0x00000] 
at Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory (System.Type type) [0x00000] 
at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateScopeSession (System.Type type) [0x00000] 
at Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession (System.Type type) [0x00000] 
at (wrapper synchronized) Castle.ActiveRecord.Framework.SessionFactoryHolder:CreateSession (System.Type) 
at Castle.ActiveRecord.ActiveRecordBase.FindAll (System.Type targetType, NHibernate.Criterion.DetachedCriteria detachedCriteria, NHibernate.Criterion.Order[] orders) [0x00000] 
at Castle.ActiveRecord.ActiveRecordBase.FindAll (System.Type targetType) [0x00000] 
at Inventory.Product.FindAll() [0x00000] in /home/mariocesar/Proyectos/Mangos/Mangos.Apps/Inventory/Product.cs:114 
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) 
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 

모든 소스 코드입니다. 문제가 NHibernate에있는 경우

http://bitbucket.org/mariocesar/mangos/src/tip/Mangos.Apps/Inventory/Product.cs

는 이해가 안 돼요, 또는 문제가 ActivRecord 경우 경우는 비계, 또는 수 없습니다.

힌트,

답변

관련 문제