NHibernate错误:Could not compile the mapping document的解决

用动软代码生成器的NHibernate生成模板,生成一个“XML映射模板”,老是提示Could not compile the mapping document的问题。

各种的找,就是没找到问题。

后来调试的时候,把所有的中断翻出来

发现bool这个类型不认识,再看CodeSmith的模板,里面对MS SQLServer的bit类型是转化为Boolean,

果断地把对应的hbm.xml里的bool类型换成Boolean,

终于搞定。

原文地址:https://www.cnblogs.com/lhl98/p/5327558.html