Unable to determine the relationship represented by navigation ‘XXX‘ of type ‘XXX‘.
项目场景:
ABP项目执行数据库迁移
问题描述:
Unable to determine the relationship represented by navigation 'XXX' of type 'XXX'. Either manually configure the relationship, or ignore this property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
原因分析:
在XXXDbContext中OnModelCreating 下缺少对初始化的配置。
解决方案:
/// <summary>
/// Fluent API
/// </summary>
public class UserEntityConfig : IEntityTypeConfiguration<User>
{public void Configure(EntityTypeBuilder<User> builder){// ......}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{base.OnModelCreating(modelBuilder);//继承自IEntityTypeConfiguration<>的各实体 Fluent APImodelBuilder.ApplyConfigurationsFromAssembly(typeof(XXXCoreModule).Assembly);
}
Unable to determine the relationship represented by navigation ‘XXX‘ of type ‘XXX‘.相关推荐
- Unable to determine if the owner (Domain\UserName) of job JOB_NAME has server access
早上巡检的的时候,发现一数据库的作业报如下错误(作业名等敏感信息已经替换),该作业的OWNER为一个域账号: JOB RUN: 'JOB_NAME' was run on 2016-6-1 at 7: ...
- Go微服务报错protoc-gen-go: unable to determine Go import path for
问题 $ protoc --go_out=./ hello.proto protoc-gen-go: unable to determine Go import path for "hell ...
- 创建Hbase Hive外部表报错: Unable to determine ZooKeeper ensemble
创建HBase的Hive外部表 1: create external table ttt(rowkey string,info map<string,string>)STORED BY ' ...
- Oracle错误:ORA-27121: unable to determine size of shared memory segment
为什么80%的码农都做不了架构师?>>> 今天在用SQLPLUS登陆数据库时,忽然报了一个错误,错误的代码如下: ORA-01034: ORACLE not available ...
- 遇到:ORA-27121: UNABLE TO DETERMINE SIZE OF SHAR...
2019独角兽企业重金招聘Python工程师标准>>> ORA-01034: ORACLE not available ORA-27121: unable to determine ...
- 连接Janusgraph时报Unable to determine Elasticsearch server version. Default to FIVE.异常
连接Janusgraph时报Unable to determine Elasticsearch server version. Default to FIVE.异常 采用的 janusgraph + ...
- 解决Unable to determine application id: com.android.tools.idea.run.ApkProvisionException:
最近Android Studio更新了3.6.1版本.我本着更新肯定比不更新好的原则,就选择更新了. 没想到遇到了一个奇怪的问题:Unable to determine application id: ...
- Android studio运行出现Unable to determine application id: com.android.tools.idea.run.ApkProvisionExcepti
Android studio运行出现Unable to determine application id: com.android.tools.idea.run.ApkProvisionExcepti ...
- 解决 Unable to determine application id: com.android.tools.idea.run.ApkProvisionException
问题:Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Error loadi ...
最新文章
- html %3c% page,page.html
- 软件测试之Selenium IDE
- linux shell字符串及字符串长度获取方式
- 008 RestFul API 拦截器
- python3创建一个游戏窗口
- java任何表达式都可以当作语句_在Java语言中语句用分号终止,并不是所有的表达式都可以构成语句...
- Teams App设备的地理位置能力
- ASP.NET Core 源码学习之 Options[1]:Configure
- JavaScript DOM编程艺术第一章:JavaScript简史
- android 向下动画,使用向上/向下滑动动画显示和隐藏视图
- 数学建模论文写作模板
- Python关键字keyword
- 理解flask中的蓝图
- python snap7 简书_第14篇-Python中的Elasticsearch入门
- 2022 Java 企业面试题汇总
- 74HC148引脚图及功能
- 拥有奇瑞QQ冰淇淋·桃欢喜才懂的幸福
- 720度全景带你vr云游景区,vr云游感受和应用介绍
- C语言之struct
- 产品经理(助理)任职要求
热门文章
- nodejs实现公众号服务URL绑定验证,nodejs实现公众号关注并回发送一条消息,以及关注之后的聊天自动回复消息
- Nvidia Agx Xavier平台10Gb PCIE网卡速度限制为1Gb问题调试记录
- 什么是刀片式服务器?
- 比较工具导出html比较结果,使用Beyond Compare如何生成文件比较报告
- excel职称计算机应用,2017职称计算机考试Excel辅导:工作表的编辑
- C#在扩展桌面播放PPT并且无任务栏按钮
- mybatis-Plus自动生成代码
- Zookeeper详解(五):通过JMX查看Zookeeper信息
- 无线华为能连苹果不能连接到服务器,华为手机连苹果Mac,连不上?手把手教你...
- BottomBarLayout——方便快捷地实现底部导航栏