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 upThere is currently no documentation on defining relationships. #270
Comments
This comment has been minimized.
|
This is because defining relationships is not a stable/supported feature. It's a work in progress that is likely to change significantly. I'm hoping to have this feature finished for the next release. #89 is the tracking issue for this feature. |
sgrif
closed this
Apr 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chasinglogic commentedApr 15, 2016
I have been browsing the issues and documentation for this project for a while now. The only guide available shows how to create one model (Post) and how to query / update it however you never relate that to anything.
I found out about #[has_many] and #[belongs_to] by reading #89 however there is no example there that I could glean (which would make sense since that's not the topic of that issue). However that does make it sound like it's possible to define relationships currently in Diesel.
I looked through the rustdoc for this library as well and couldn't find anything that would help either. I'd be willing to write this documentation but unfortunately I can't even figure out how to get started :'(
Ideally the current getting started guide could just be updated to add a relationship to post like comments or user for example.
If I have somehow missed the examples of using these traits I apologize.