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
I come from another ORM in another language namely Doctrine for Php and I'm quite surprise how complicated setting up a Many to Many relationship remains in the Python realm. In my previous experience the ORM was ther to "stop thinking about table and instead think only about object and relations" the key feature being that Doctrine was dealing with all the table related things including the link table for many-to-many relations.
Would it be possible in SQLModel to detect Many-to-many relations at model parsing and automatically create the link table ?
several advantage that I can think about are:
The table does not appear in the generated graphs (whatver the lib you select)
The user cannot make a mistake setting it up
any relation types are dealt the same way: in the classes
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I come from another ORM in another language namely Doctrine for Php and I'm quite surprise how complicated setting up a Many to Many relationship remains in the Python realm. In my previous experience the ORM was ther to "stop thinking about table and instead think only about object and relations" the key feature being that Doctrine was dealing with all the table related things including the link table for many-to-many relations.
Would it be possible in SQLModel to detect Many-to-many relations at model parsing and automatically create the link table ?
several advantage that I can think about are:
Beta Was this translation helpful? Give feedback.
All reactions