Activities of "829098@qq.com"

hi

Please use English to describe the problem. Our suite colleagues will check the problem.

ABP Framework version: v8.0.1

UI Type: MVC

Database System: EF Core (SQL Server

Tiered (for MVC) or Auth Server Separated (for Angular): no

Exception message and full stack trace:

Steps to reproduce the issue:

1、use abp suite build entity A,Master type 2、use abp suite build entity B,Child type,set parent is A 3、run system. Create A , And then Create B,but the B save button is no response

when I search in my application the word $(this).data("projectFlowing-id") and replace the projectflowing placeholder with your entity name as lowercase. the save function can response, but has one inner exception.

2024-01-11 17:44:13.980 +08:00 [ERR] An error occurred while saving the entity changes. See the inner exception for details. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): INSERT 语句与 FOREIGN KEY 约束"FK_AppFlowingReports_AppProjectFlowings_ProjectFlowingId"冲突。该冲突发生于数据库"ProjectReward",表"dbo.AppProjectFlowings", column 'Id'。 语句已终止。

AppProjectFlowings is Parent Table。 AppFlowingReports is child Table。

多谢,问题已解决。

你好

你改成DeleteBehavior.Cascade, 之后添加新迁移, 数据库就可以了

谢谢,是不是abp suite 生成代码时,不要勾选 数据库迁移,在生成代码之后,在解决方案里边,找到生成的代码,改为 DeleteBehavior.Cascad,然后设置 迁移项目为启动项目,执行迁移的方式即可?

这是EF Core 8 的一个bug

请关注 https://github.com/dotnet/efcore/issues/32383

我会尝试找一个解决方案

好的,感谢大神,期待早日解决。

这是我的到的错误日志

[11:12:11 ERR] ---------- RemoteServiceErrorInfo ---------- 
{ 
  "code": null, 
  "message": "An internal error occurred during your request!", 
  "details": null, 
  "data": {}, 
  "validationErrors": null 
} 
 
[11:12:11 ERR] The property 'BookAuthor.BookId' is part of a key and so cannot be modified or marked as modified. To change the principal of an existing entity with an identifying foreign key, first delete the dependent and invoke 'SaveChanges', and then associate the dependent with the new principal. 
System.InvalidOperationException: The property 'BookAuthor.BookId' is part of a key and so cannot be modified or marked as modified. To change the principal of an existing entity with an identifying foreign key, first delete the dependent and invoke 'SaveChanges', and then associate the dependent with the new principal. 
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.NavigationFixer.ConditionallyNullForeignKeyProperties(InternalEntityEntry dependentEntry, InternalEntityEntry principalEntry, IForeignKey foreignKey) 
  

错误日志在哪里能看到,我从YourProjectWebHost目录的 logs文件夹打开的log文件,是没有这个信息的。另外,这个错误有什么处理建议吗

ABP Framework version: v8.0.1

UI Type: MVC

Database System: EF Core (SQL Server

Tiered (for MVC) or Auth Server Separated (for Angular): no

Exception message and full stack trace:

Steps to reproduce the issue:

1、use abp suite build entity A,Master type 2、use abp suite build entity B,Child type,set parent is A 3、run system. Create A , And then Create B,but the B save button is no response

生成的代码,选择 ApplicationTemplate,MVC,MS SQL SERVER 数据库

请你花几分钟, 1、使用abp suite 创建A对象,关联B对象(多对多导航关系), 2、运行代码 3、创建A对象时,关联选择一个或者多个B对象, 4、编辑A对象,把其中的B对象删除一个,点击保存,报错。

App logs:

YourWebHostProject/Logs/logs.txt

Suite logs: C:\Users\usernmae.abp\suite\logs

查看了,操作后,发现日志没有记录任何报错信息

你先分享一下内部服务器错误的日志.

你用abp suite 可以复现的。没有改动任何代码。

Showing 21 to 30 of 47 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13