-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Starting Server Due to mappedBy reference in module models #9569
Comments
Hello @vholik Sorry for the late reply. Actually, the error you get is because the DML is not able to discover the inverse of the relationship using the default naming convention. So there are two ways to fix it.
|
Bug report
Describe the bug
I encountered an error when starting the server, related to the relationships between my models in one
vehicle
module. The error specifically points to an unknown mappedBy reference between VehicleYear and VehicleModel.brand.ts
year.ts
model.ts
I suspect the error might be due to having both
model.belongsTo
andmodel.hasMany
in the same models (VehicleYear
andVehicleModel
).System information
Medusa version (including plugins):
Node.js version:
Database:
Operating system:
Browser (if relevant):
Steps to reproduce the behavior
Expected behavior
A clear and concise description of what you expected to happen
Screenshots
If applicable, add screenshots to help explain your problem
Code snippets
If applicable, add code samples to help explain your problem
Additional context
Add any other context about the problem here
The text was updated successfully, but these errors were encountered: