codegen typing issue #10559
Unanswered
michael-land
asked this question in
Q&A
Replies: 1 comment
-
The issue/feature request might be to expose Data Model Relationships' auto-generated column |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a concern about the generated typing for the custom model.
Here’s the code defining the Employee model copied from b2b starter:
And the corresponding database DML:
Here’s the auto-generated typing for this model (from .medusa/types/remote-query-entry-points.d.ts):
As you can see, the generated type includes only company but not company_id. How can I adjust the model definition, so the generated typing to include a company_id field?
In the core model example with MikroORM, e.g. in the shipping-option model, both shipping_profile_id and shipping_profile were generated in type.
medusa/packages/modules/fulfillment/src/models/shipping-option.ts
Lines 99 to 127 in 376b9e8
I’d like something similar for the company and company_id, so i can reference the column in the
graph.query
apiBeta Was this translation helpful? Give feedback.
All reactions