You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the ClassViewModel for model entities only takes the first property with IsPrimaryKey and additionally because the IsPrimaryKey property only looks for the KeyAttribute (ignoring anything set up in the fluent interface), composite keys aren't currently supported by the generated API controllers.
Stuff needed to support this.
Change ClassViewModel to have a collection of primary keys,
Change ApiController generator to generate anonymous types for key parameters when keys number more than one.
Change IsPrimaryKey impl to be aware of both fluently-defined keys and attributed ones.
The text was updated successfully, but these errors were encountered:
There are also several spots where the key is returned as a query string. We would need to figure this one out as well. Significant bit of work here. Not sure if the complexity is worth it rather than just adding a single primary key which some would hold is a good practice anyway.
I agree it's non-trivial and complex, but it would also enable the multi-tenant #5 story with SQL row-level security (i.e. a tenant_id field on every model).
Because the ClassViewModel for model entities only takes the first property with IsPrimaryKey and additionally because the IsPrimaryKey property only looks for the KeyAttribute (ignoring anything set up in the fluent interface), composite keys aren't currently supported by the generated API controllers.
Stuff needed to support this.
The text was updated successfully, but these errors were encountered: