nhibernate常见错误

时间:2020-04-05 21:32:47   收藏:0   阅读:78

unitinfoDAOTest.unitinfoDAOTest.UpdateTest:
SetUp : NHibernate.MappingException : Domain.unitinfo.hbm.xml(7,6): XML validation error: 元素 命名空间“urn:nhibernate-mapping-2.2”中的“class”。 的子元素 命名空间“urn:nhibernate-mapping-2.2”中的“property”。 无效。应为可能元素的列表: 命名空间“urn:nhibernate-mapping-2.2”中的“meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id”。。
----> System.Xml.Schema.XmlSchemaValidationException : 元素 命名空间“urn:nhibernate-mapping-2.2”中的“class”。 的子元素 命名空间“urn:nhibernate-mapping-2.2”中的“property”。 无效。应为可能元素的列表: 命名空间“urn:nhibernate-mapping-2.2”中的“meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id”。。

============================================================================================================================================================

报这个错时,不要犹豫,多半是缺少元素,id元素是必须的。

原文:https://www.cnblogs.com/Sabre/p/12638977.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!