NHibernate: No persister for: U_SHOP.Entity.Domain.Address解决方案

简介: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information ab...
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NHibernate.MappingException: No persister for: U_SHOP.Entity.Domain.Address

Source Error:

Line 30:         public long InsertAddress(Entity.Domain.Address ad)
Line 31: {
Line 32: long result=Convert.ToInt64(Session.Save(ad));
Line 33: Session.Flush();
Line 34: return result;

Source File: G:\U-Shop\Code\U-SHOP.DAL.SQLServerImpl\AddressBookSqlDAO.cs    Line: 32


解决方案:

XML文件的默认生成操作为“内容”,需要修改为“嵌入的资源”生成

 

 

 

版权

作者:灵动生活 郝宪玮

出处:http://www.cnblogs.com/ywqu

如果你认为此文章有用,请点击底端的【推荐】让其他人也了解此文章,

img_2c313bac282354945ea179a807d7e70d.jpg

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

 

相关文章
|
3天前
|
Java 数据库连接
错误org.hibernate.AnnotationException: No identifier specified for entity
请根据你的实际情况,将实体类中的字段和注解进行适当的调整,以确保每个实体类都有一个明确定义的标识符(主键)。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
5 0
|
10月前
Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type ‘com.sd.sbmb.dao.U
Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type ‘com.sd.sbmb.dao.U
146 0
Service group - get entity set
Created by Wang, Jerry on Jan 12, 2015
74 0
Service group - get entity set
de.hybris.platform.servicelayer.dto.converter.ConversionException
de.hybris.platform.servicelayer.dto.converter.ConversionException
138 0
|
关系型数据库 MySQL