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; }
}
Given the following entity configurations:
builder.Entity<Employee>(b =>
{
b.ConfigureByConvention();
b.HasOne(x => x.Course).WithMany().HasForeignKey(x => x.CourseId);
});
builder.Entity< Course >(b =>
{
});
When the CourseId associated with an Employee is changed, the PublishEventsForTrackedEntity feature in the DbContext does not trigger a change event for the Employee entity, even though the Employee entity is effectively modified.
This behavior appears to be inconsistent, as changes to the Employee should ideally trigger the corresponding event.
Resolved , thanks
Follow the steps in the https://docs.abp.io/en/abp/7.3/UI/Angular/Component-Replacement to replace PersonalSettingsComponent the below
this.replaceableComponents.add({ component: PersonalSettingsComponent, key: eAccountComponents.PersonalSettings, });
but there is nothing change in the profile setting tab.
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)'
below the config from the suite appSettings.json
Note: When adding the newly created module from the suite the AngularSolutionRootPath value is **null **, UiFramework=2 ,UiFrameworkName="MVC"
{
"IsDotnetEfCoreToolInstalled": true,
"Solutions": [
{
"AbpVersion": "6.0.0",
"ActiveDate": "2023-09-23T02:48:04.8084703+03:00",
"AngularSolutionRootPath": "D:\\_Source\\Repos\\MyCompany.MyProject\\angular",
"ApplicationContractsExists": true,
"ApplicationContractsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Application.Contracts",
"ApplicationProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Application",
"ApplicationTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.Application.Tests",
"BlazorProjectDirectory": null,
"DatabaseProvider": 1,
"DatabaseProviderName": "EntityFrameworkCore",
"DbContextFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore\\EntityFrameworkCore\\MyProjectDbContext.cs",
"DbContextModelCreatingExtensionsFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore\\EntityFrameworkCore\\MyProjectDbContext.cs",
"DefaultNamespace": "MyCompany.MyProject",
"DefaultNamespaceAsCamelCase": "myCompany.myproject",
"DomainProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Domain",
"DomainSharedProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Domain.Shared",
"EntityFrameworkCoreDbMigrationsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore",
"EntityFrameworkCoreProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore",
"EntityFrameworkCoreTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.EntityFrameworkCore.Tests",
"HttpApiHostProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi.Host",
"HttpApiProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi",
"Id": "68caa486-a030-4773-ab6d-b4a32047d08e",
"IsTieredArchitecture": true,
"MigrationsMigrationsDbContext": "MyProjectDbContext",
"MigratorCsprojFileName": "MyCompany.MyProject.DbMigrator.csproj",
"MigratorProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.DbMigrator",
"MigratorProjectExists": true,
"MongoDbProjectDirectory": null,
"MongoDbTestsProjectDirectory": null,
"Name": "MyCompany.MyProject",
"NolayerProjectDirectory": null,
"OnlyProjectName": "MyProject",
"Path": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\MyCompany.MyProject.sln",
"ProjectNameWithCompanyName": "MyCompany.MyProject",
"ProjectTemplateType": 1,
"RootProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core",
"SrcFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src",
"StartupProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi.Host",
"StartupProjectName": "MyCompany.MyProject.HttpApi.Host",
"TenantDbContextFilePath": null,
"TenantMigrationsMigrationsDbContext": "MyProjectTenantDbContext",
"TestBaseProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.TestBase",
"TestFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test",
"UiFramework": 3,
"UiFrameworkName": "Angular",
"UpdateDatabaseMethod": 1,
"WebProjectDirectory": null
},
{
"AbpVersion": "6.0.0",
"ActiveDate": "2023-09-25T09:55:40.588693+03:00",
"AngularSolutionRootPath": "D:\\_Source\\Repos\\MyCompany.MyProject\\angular\\projects\\dynamic-entities",
"ApplicationContractsExists": true,
"ApplicationContractsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Application.Contracts",
"ApplicationProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Application",
"ApplicationTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.Application.Tests",
"BlazorProjectDirectory": null,
"DatabaseProvider": 1,
"DatabaseProviderName": "EntityFrameworkCore",
"DbContextFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore\\EntityFrameworkCore\\DynamicEntitiesDbContext.cs",
"DbContextModelCreatingExtensionsFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore\\EntityFrameworkCore\\DynamicEntitiesDbContextModelCreatingExtensions.cs",
"DefaultNamespace": "MyCompany.Framework.DynamicEntities",
"DefaultNamespaceAsCamelCase": "myCompany.framework.dynamicEntities",
"DomainProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Domain",
"DomainSharedProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Domain.Shared",
"EntityFrameworkCoreDbMigrationsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore",
"EntityFrameworkCoreProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore",
"EntityFrameworkCoreTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore.Tests",
"HttpApiHostProjectDirectory": null,
"HttpApiProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.HttpApi",
"Id": "08f9b6ec-1341-4586-b00c-27765e6187a1",
"IsTieredArchitecture": false,
"MigrationsMigrationsDbContext": "DynamicEntitiesMigrationsDbContext",
"MigratorCsprojFileName": "MyCompany.Framework.DynamicEntities.DbMigrator.csproj",
"MigratorProjectDirectory": null,
"MigratorProjectExists": false,
"MongoDbProjectDirectory": null,
"MongoDbTestsProjectDirectory": null,
"Name": "MyCompany.Framework.DynamicEntities",
"NolayerProjectDirectory": null,
"OnlyProjectName": "DynamicEntities",
"Path": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\MyCompany.Framework.DynamicEntities.sln",
"ProjectNameWithCompanyName": "MyCompany.Framework.DynamicEntities",
"ProjectTemplateType": 2,
"RootProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities",
"SrcFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src",
"StartupProjectDirectory": null,
"StartupProjectName": null,
"TenantDbContextFilePath": null,
"TenantMigrationsMigrationsDbContext": "DynamicEntitiesTenantMigrationsDbContext",
"TestBaseProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.TestBase",
"TestFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test",
"UiFramework": 3,
"UiFrameworkName": "Angular",
"UpdateDatabaseMethod": 1,
"WebProjectDirectory": null
}
]
}
I follow the steps from this URL: https://docs.abp.io/en/commercial/latest/themes/lepton-x/commercial/angular to install LeptonX Pro Theme