Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLet infer_schema also infer associations #335
Comments
quadrupleslap
referenced this issue
Feb 18, 2017
Closed
If I use `infer_schema!` do I need to call `joinable!` myself? #729
This comment has been minimized.
Eijebong
closed this
Aug 9, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
weiznich commentedMay 18, 2016
infer_schema could also try to infer some associations from foreign key constrains and add the corresponding implementations of JoinTo.
For example the following case:
It should be possible to let the macro implement the following association(or something similar to this):
This could probably be implemented after the release of diesel 1.0, but keep in mind it could be a minor breaking if you implement this relation already manually.