-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
Current behavior:
- Create a new Coalesce project from the template
- Add the
Microsoft.EntityFrameworkCore.SqlServer.HierarchyIdpackage to the project - Add a property to a model that uses the type
HierarchyId - Code generation fails with:
** Failure: Coalesce.TestProject.Data.Models.MyModel,MyModelHierarchyId: The target object for the property has no discernible display text. Add a [ListTextAttribute] to one of its properties.
Currently this behavior can be worked around by decorating the new property with the [InternalUse] property, but then the property will be ignored by Coalesce and not show up in generated DTOs or Typescript types.
### Tasks
- [ ] Add the `Microsoft.EntityFrameworkCore.SqlServer.HierarchyId` package to Coalesce
- [ ] Add the above package to the generated solution
- [ ] Add a check in the context validation to recognize usage of the `HierarchyId` type
- [ ] Add a special case in DTO generators and mappers to convert `HierarchyId` to a string type and back
- [ ] Add `HierarchyId` properties to test fixtures and expand tests to assert that APIs, DTOs and Typescript types generate properly for the new types