**Here is the console output from Power Tools ** (generated ItemCategories as Master-Detail)....(I've redacted the calls to prettier, etc.)
-> ItemCategoriesAppService.cs is being generated.
-> IItemCategoriesAppService.cs is being generated.
-> ItemCategoryConsts.cs is being generated.
-> CreateOrEditItemCategoryDto.cs is being generated.
-> ItemCategoryDto.cs is being generated.
-> GetAllItemCategoriesForExcelInput.cs is being generated.
-> GetAllForLookupTableInput.cs is being generated.
-> GetAllItemCategoriesInput.cs is being generated.
-> GetItemCategoryForViewDto.cs is being generated.
-> GetItemCategoryForEditOutput.cs is being generated.
-> ItemCategory.cs is being generated.
-> ItemCategoriesExcelExporter.cs is being generated.
-> IItemCategoriesExcelExporter.cs is being generated.
-> AppPermissions.cs is being modified.
-> AppAuthorizationProvider.cs is being modified.
-> WMSPlatformDbContext.cs is being modified.
-> CustomDtoMapper.cs is being modified.
Starting to create child table items for Items.ItemSubcategory.json -> ItemSubcategoriesAppService.cs is being generated. -> IItemSubcategoriesAppService.cs is being generated. -> ItemSubcategoryConsts.cs is being generated. -> CreateOrEditItemSubcategoryDto.cs is being generated. -> ItemSubcategoryDto.cs is being generated. -> GetAllItemSubcategoriesForExcelInput.cs is being generated. -> GetAllForLookupTableInput.cs is being generated. -> GetAllItemSubcategoriesInput.cs is being generated. -> GetItemSubcategoryForViewDto.cs is being generated. -> GetItemSubcategoryForEditOutput.cs is being generated. -> ItemSubcategoryItemCategoryLookupTableDto.cs is being generated. -> ItemSubcategory.cs is being generated. -> ItemSubcategoriesExcelExporter.cs is being generated. -> IItemSubcategoriesExcelExporter.cs is being generated. -> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> WMSPlatformDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified. -> itemSubcategories.component.ts is being generated. -> itemSubcategories.component.html is being generated. -> create-or-edit-itemSubcategory.component.html is being generated. -> create-or-edit-itemSubcategory.component.ts is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.ts is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.html is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.less is being generated. -> itemSubcategory.module.ts is being generated. -> itemSubcategory-routing.module.ts is being generated. -> view-itemSubcategory.component.html is being generated. -> view-itemSubcategory.component.ts is being generated. -> main-routing.module.ts is being modified. -> app-navigation.service.ts is being modified. -> service-proxy.module.ts is being modified. -> WMSPlatform.xml is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 2.43s. -> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> WMSPlatformDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified. -> masterDetailChild_ItemCategory_itemSubcategories.component.ts is being generated. -> masterDetailChild_ItemCategory_itemSubcategories.component.html is being generated. -> masterDetailChild_ItemCategory_itemSubcategory.module.ts is being generated. -> service-proxy.module.ts is being modified. -> masterDetailChild_ItemCategory_itemSubcategories.component.ts is being modified. -> WMSPlatform.xml is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 2.73s.
Child table items for Items.ItemSubcategory.json were created!
-> itemCategories.component.ts is being generated. -> itemCategories.component.html is being generated. -> create-or-edit-itemCategory-modal.component.html is being generated. -> create-or-edit-itemCategory-modal.component.ts is being generated. -> itemCategory.module.ts is being generated. -> itemCategory-routing.module.ts is being generated. -> view-itemCategory-modal.component.html is being generated. -> view-itemCategory-modal.component.ts is being generated. -> main-routing.module.ts is being modified. -> app-navigation.service.ts is being modified. -> service-proxy.module.ts is being modified. -> WMSPlatform.xml is being modified. -> ItemSubcategoriesAppService.cs is being modified. -> GetAllItemSubcategoriesInput.cs is being modified. -> GetAllItemSubcategoriesForExcelInput.cs is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 3.08s.
Code generation is complete. Press ENTER to exit...
Angular compilation generates these errors: (There are many more errors that follow)
` ./src/app/main/items/itemSubcategories/masterDetailChild_ItemCategory_itemSubcategory.module.ts:11:0-160 - Error: Module not found: Error: Can't resolve './masterDetailChild_ItemCategory_create-or-edit-itemSubcategory.component' in 'D:\XXX\angular\src\app\main\items\itemSubcategories'
./src/app/main/items/itemSubcategories/masterDetailChild_ItemCategory_itemSubcategory.module.ts:12:0-142 - Error: Module not found: Error: Can't resolve './masterDetailChild_ItemCategory_view-itemSubcategory.component' in 'D:\XXX\angular\src\app\main\items\itemSubcategories'
Error: src/app/main/items/itemCategories/itemCategory.module.ts:17:9 - error NG6002: 'MasterDetailChild_ItemCategory_ItemSubcategoryModule' does not appear to be an NgModule class.
17 MasterDetailChild_ItemCategory_ItemSubcategoryModule, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `
Power Tools did not generate the files indicated (masterDetailChild_ItemCategory_create-or-edit-itemSubcategory.component and masterDetailChild_ItemCategory_view-itemSubcategory.component).
**Items.ItemCategory.json: **
{ "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "Items", "EntityName": "ItemCategory", "EntityNamePlural": "ItemCategories", "TableName": "ItemCategories", "PrimaryKeyType": "long", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": false, "UpdateDatabase": false, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "IsNonModalCRUDPage": false, "IsMasterDetailPage": true, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Category", "Type": "string", "MaxLength": 50, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} } ], "NavigationProperties": [], "NavigationPropertyOneToManyTables": [ { "EntityJson": "Items.ItemSubcategory.json", "ForeignPropertyName": "ItemCategoryId", "IsNullable": "False", "DisplayPropertyName": "Category", "ViewType": "LookupTable" }, ], "EnumDefinitions": [], "DbContext": null }
Items.ItemSubcategory.json
{ "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "Items", "EntityName": "ItemSubcategory", "EntityNamePlural": "ItemSubcategories", "TableName": "ItemSubcategories", "PrimaryKeyType": "long", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": false, "UpdateDatabase": false, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "IsNonModalCRUDPage": true, "IsMasterDetailPage": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Subcategory", "Type": "string", "MaxLength": 50, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} } ], "NavigationProperties": [{ "Namespace": "WMSPlatform.Items", "ForeignEntityName": "ItemCategory", "IdType": "long", "IsNullable": false, "PropertyName": "ItemCategoryId", "DisplayPropertyName": "Category", "DuplicationNumber": 0, "RelationType": "single", "ViewType": "LookupTable", "IsGeneratedByMasterPage": true },], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }
Also, I cannot use the Power Tools "Regenerate Entity" function with any entity that has navigation properties, because of runtime errors during generation, but that's a separate issue.
I generated the entity again as a normal CRUD (not Master-Detail) so that I can continue to work on this project, but I really need to set these entities up as Master-Detail (and I have quite a few other entities that are master-detail or 1:many).
Any update on this?
I just downloaded a new ASPNetZero solution (core+Angular).. I tried to use the newest Power Tools (in VS2022) to generate a Master-Detail relationship with 2 very simple entities:
I would like to be able to create a view for each Category, where the Subcategories for that Category are listed (and there is also a link to create a new Subcategory for the currently selected Category).
I can't compile the Angular project (I get the same errors about missing 'view' and 'create or edit' components).
Will there be a new version of Power Tools soon (with Master-Detail working for Angular)?