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 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文件的默认生成操作为“内容”,需要修改为“嵌入的资源”生成

 










本文转自 灵动生活 51CTO博客,原文链接:http://blog.51cto.com/smartlife/510198,如需转载请自行联系原作者

目录
相关文章
|
7月前
|
Java API 数据库
Java一分钟之-JPA注解:@Entity, @Table, @Id等
【6月更文挑战第14天】Java Persistence API (JPA) 是Java开发中的ORM框架,通过注解简化数据访问层。本文介绍了三个核心注解:`@Entity`标识实体类,`@Table`自定义表名,`@Id`定义主键。易错点包括忘记添加`@Entity`、未正确设置主键。建议使用`@GeneratedValue`和`@Column`细化主键策略和字段映射。正确理解和应用这些注解能提高开发效率和代码质量。
436 3
|
8月前
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘order‘. Caus
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘order‘. Caus
133 0
MyBatisPlus如何根据id批量查询?Required request parameter ‘id‘ for method 解决方法是看青戈大佬MybatisPlus的教程
MyBatisPlus如何根据id批量查询?Required request parameter ‘id‘ for method 解决方法是看青戈大佬MybatisPlus的教程
|
6月前
|
Java Spring
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
|
8月前
|
Java 数据库连接
错误org.hibernate.AnnotationException: No identifier specified for entity
请根据你的实际情况,将实体类中的字段和注解进行适当的调整,以确保每个实体类都有一个明确定义的标识符(主键)。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
95 0
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
113 0
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
240 0
|
Java 数据库连接 mybatis
mybatis报错Type interface xxx.Dao is not known to the MapperRegistry
mybatis报错Type interface xxx.Dao is not known to the MapperRegistry
|
Java
修改广告接口(alipay.marketing.cdp.advertise.modify)JAVA版本demo
说明:         该接口是开发者帮助线下商家修改广告内容,如修改的是线上的广告内容,需要先将线上广告内容下架,再修改,修改后操作上架,才能在支付宝钱包APP看到修改后的广告内容。运营位类型可以选择图片或H5。
409 12