Hi,
you can try
Configure<AbpEntityChangeOptions>(options => { options.PublishEntityUpdatedEventWhenNavigationChanges = true; })
https://abp.io/docs/latest/framework/infrastructure/event-bus/local#abpentitychangeoptions
If an Employee is linked to a Course through the CourseId property, for example, an employee initially assigned to a "Math" course with a CourseId of 856, and then the course is changed to "Physics" with a CourseId of 499, the CourseId property in the Employee entity will be updated accordingly. However, as written in the code (referenced in Section 1), this change is being skipped and does not proceed to Section 2 for further handling.
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
public int CourseId { get; set; } // Foreign Key for Course
}
public class Course
{
public int Id { get; set; }
public string Name { get; set; }
}
Resolved , thanks
Attched the genration logs
``2023-09-25 09:55:24.385 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetPropertyTypes (Volo.Abp.Suite)'
2023-09-25 09:55:24.385 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/get-property-types?uiFrameworkName=Mvc application/json - - 200 - application/json;+charset=utf-8 2.5816ms
2023-09-25 09:55:40.488 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:3000/api/abpSuite/solutions/08f9b6ec-1341-4586-b00c-27765e6187a1/is-built application/json -
2023-09-25 09:55:40.488 +03:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite)'
2023-09-25 09:55:40.489 +03:00 [INF] Route matched with {action = "IsSolutionBuilt", controller = "AbpSuite", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Boolean] IsSolutionBuiltAsync(System.Guid) on controller Volo.Abp.Suite.Controllers.AbpSuiteController (Volo.Abp.Suite).
2023-09-25 09:55:40.577 +03:00 [INF] Executing ObjectResult, writing value of type 'System.Boolean'.
2023-09-25 09:55:40.577 +03:00 [INF] Executed action Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite) in 88.7147ms
2023-09-25 09:55:40.577 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite)'
2023-09-25 09:55:40.577 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/solutions/08f9b6ec-1341-4586-b00c-27765e6187a1/is-built application/json - - 200 - application/json;+charset=utf-8 89.0619ms
2023-09-25 09:55:40.581 +03:00 [INF] Request starting HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/08f9b6ec-1341-4586-b00c-27765e6187a1/save-and-generate-entity application/json 1701
2023-09-25 09:55:40.581 +03:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
2023-09-25 09:55:40.582 +03:00 [INF] Route matched with {controller = "crudPageGenerator", action = "SaveAndGenerateEntity", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.NoContentResult] SaveAndGenerateEntityAsync(System.Guid, Volo.Abp.Suite.Models.EntityModel) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
2023-09-25 09:55:40.794 +03:00 [INF]
=== ENTITY GENERATION STARTED ===
* SOLUTION: MyProject.Framework.Finance
* ENTITY:{
"Id": "1405674c-a8ad-4c53-a1d9-1f57757c086c",
"Name": "Symbol",
"OriginalName": "Symbol",
"NamePlural": "Symbols",
"DatabaseTableName": "Symbols",
"Namespace": "Symbols",
"BaseClass": "AuditedEntity",
"MenuIcon": "file-alt",
"PrimaryKeyType": "Guid",
"IsMultiTenant": false,
"CheckConcurrency": true,
"ShouldCreateUserInterface": true,
"ShouldCreateBackend": true,
"ShouldExportExcel": false,
"ShouldAddMigration": true,
"ShouldUpdateDatabase": true,
"CreateTests": true,
"Properties": [
{
"Id": "6ac4a090-3afb-497b-ab3c-d9189a659e51",
"Name": "Name",
"Type": "string",
"EnumType": "",
"EnumNamespace": "",
"EnumAngularImport": "shared/enums",
"EnumFilePath": null,
"DefaultValue": null,
"IsNullable": false,
"IsRequired": true,
"IsTextArea": false,
"MinLength": null,
"MaxLength": 500,
"SortOrder": 0,
"SortType": 0,
"Regex": "",
"EmailValidation": false,
"EnumValues": null,
"IsSelected": true,
"OrdinalIndex": 0
},
{
"Id": "3a9a0653-9cb5-41bd-9315-d6841e7137ac",
"Name": "Type",
"Type": "string",
"EnumType": "",
"EnumNamespace": "",
"EnumAngularImport": "shared/enums",
"EnumFilePath": null,
"DefaultValue": null,
"IsNullable": false,
"IsRequired": true,
"IsTextArea": false,
"MinLength": null,
"MaxLength": 50,
"SortOrder": 0,
"SortType": 0,
"Regex": "",
"EmailValidation": false,
"EnumValues": null,
"IsSelected": true,
"OrdinalIndex": 0
},
{
"Id": "ae00cf5c-e2f8-462b-be48-c38e67e5bda3",
"Name": "Value",
"Type": "string",
"EnumType": "",
"EnumNamespace": "",
"EnumAngularImport": "shared/enums",
"EnumFilePath": null,
"DefaultValue": null,
"IsNullable": false,
"IsRequired": true,
"IsTextArea": false,
"MinLength": null,
"MaxLength": 1000,
"SortOrder": 0,
"SortType": 0,
"Regex": "",
"EmailValidation": false,
"EnumValues": null,
"IsSelected": true,
"OrdinalIndex": 0
}
],
"NavigationProperties": [],
"NavigationConnections": [],
"PhysicalFileName": "Symbol.json"
}
2023-09-25 09:55:40.794 +03:00 [INF] 1/8 - EntityGenerateCommand started...
2023-09-25 09:55:40.887 +03:00 [INF] 1/8 - EntityGenerateCommand completed. | Duration: 93 ms.
2023-09-25 09:55:40.887 +03:00 [INF] 2/8 - RepositoryCommand started...
2023-09-25 09:55:40.931 +03:00 [INF] 2/8 - RepositoryCommand completed. | Duration: 44 ms.
2023-09-25 09:55:40.931 +03:00 [INF] 3/8 - ManagerCommand started...
2023-09-25 09:55:40.939 +03:00 [INF] 3/8 - ManagerCommand completed. | Duration: 7 ms.
2023-09-25 09:55:40.939 +03:00 [INF] 4/8 - AppServiceCommand started...
2023-09-25 09:55:40.994 +03:00 [INF] 4/8 - AppServiceCommand completed. | Duration: 54 ms.
2023-09-25 09:55:40.994 +03:00 [INF] 5/8 - ProxyControllerCommand started...
2023-09-25 09:55:41.002 +03:00 [INF] 5/8 - ProxyControllerCommand completed. | Duration: 8 ms.
2023-09-25 09:55:41.002 +03:00 [INF] 6/8 - PermissionCommand started...
2023-09-25 09:55:41.033 +03:00 [INF] 6/8 - PermissionCommand completed. | Duration: 30 ms.
2023-09-25 09:55:41.033 +03:00 [INF] 7/8 - ApplicationObjectMappingCommand started...
2023-09-25 09:55:41.040 +03:00 [INF] 7/8 - ApplicationObjectMappingCommand completed. | Duration: 6 ms.
2023-09-25 09:55:41.040 +03:00 [INF] 8/8 - UnitTestCommandCommand started...
2023-09-25 09:55:41.064 +03:00 [INF] 8/8 - UnitTestCommandCommand completed. | Duration: 23 ms.
2023-09-25 09:55:41.064 +03:00 [INF] Entity generation completed in 0 sec.
2023-09-25 09:55:41.065 +03:00 [INF] Executing StatusCodeResult, setting HTTP status code 204
2023-09-25 09:55:41.065 +03:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite) in 483.0533ms
2023-09-25 09:55:41.065 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'