Json: in migrations, improve the order in which we generate json columns in the table
Open
area-json
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
Currently we scaffold non-json columns (respecting their order) and then we scaffold all json columns in alphabetical order. Ideally we would put json column in the position that the navigation it's containing is placed in the entity, e.g.
```cs
public class Customer
{
public int Id {get;set;}
public Address WorkAddress {get;set;} // mapped to json
public Address HomeAddress {get;set;} // mapped to json
public string Name {get;set;}
}
```
we should create columns in this order:
```Id, WorkAddress, HomeAddress, Name```
but currently we create:
```Id, Name, HomeAddress, WorkAddress```
Contributor guide
Assessment
This issue has not been assessed yet.