Closed codegod100 closed 1 day ago
fixed this one by calling find(&db)
after user()
, I guess that's an api requirement.
Still learning what's a bug and what is user error.
Yes, it is an API requirement. You can specify includes: https://github.com/tokio-rs/toasty/blob/main/tests/client/tests/has_many_preload.rs#L42-L46
I need to look if I did it yet, but the intent is to include a .query
method or something on the association to do an explicit query to load the data.
I'm still grokking the source code but one of my models doesn't have a value on
BelongsTo
which is throwing a panicI currently have a model that belongs to more than one model so that might be causing it but I'm not sure. Including my schema file: