2010-06-02 3 views
0

Je suis assez bloqué à propos d'une exception. J'utilise Active Record et Monorail. J'ai pu utiliser les contrôleurs d'échafaudage en monorail, jusqu'à ce que j'ajoute de nouveaux modèles.Monorail Excpetion, "La clé donnée n'était pas présente dans le dictionnaire."

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] 

Voici tout le code source: http://bitbucket.org/mariocesar/mangos/src

Par exemple, pour le modèle Inventory.Product il y a ProduitsController, ça marche jusqu'à ce que j'ajouter quelques relations.

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

Je ne comprends pas si le problème est dans NHibernate, ou si elle ne peut être Échafaudage, ou si le problème est ActivRecord.

Un soupçon, serait bien

Répondre

Questions connexes