0

我想创建一个过程来检查数据库结构,对于大多数我只看“NHibernate.Cfg.Configuration.ClassMappings”,但我可以' t在PersistentClass集合或每个类属性中查找映射如下所示的字段生成的表列表:流利NHibernate的“HasMany”类在Configuration.ClassMappings

... 
HasManyToMany(x => x.ChildrenListField); 
... 

我该怎么做?

回答

1

我猜你正在寻找的是CollectionMappings

foreach (var clazz in cfg.CollectionMappings) 
.... 
+0

它的工作,谢谢。 – maiconmm