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
Using #[has_many(posts)] on a User struct throws this error:
src/models/user.rs:12:19: 12:19 error: multiple applicable items in scope [E0034]
src/models/user.rs:12 #[has_many(posts)]
^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 help: run `rustc --explain E0034` to see a detailed explanation
src/models/user.rs:12:19: 12:19 note: candidate #1 is defined in an impl of the trait `diesel::expression::Expression` for the type `diesel::expression::predicates::Eq<_, _>`
src/models/user.rs:12 #[has_many(posts)]
^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #2 is defined in an impl of the trait `diesel::query_builder::update_statement::changeset::Changeset` for the type `diesel::expression::predicates::Eq<_, _>`
src/models/user.rs:12 #[has_many(posts)]
^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #3 is defined in an impl of the trait `diesel::expression::Expression` for the type `&_`
src/models/user.rs:12 #[has_many(posts)]
^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
src/models/user.rs:12:19: 12:19 note: candidate #4 is defined in an impl of the trait `diesel::query_builder::QueryFragment` for the type `_`
src/models/user.rs:12 #[has_many(posts)]
^
src/models/user.rs:12:1: 12:19 note: in this expansion of #[has_many] (defined in src/models/user.rs)
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
Using
#[has_many(posts)]
on a User struct throws this error:The text was updated successfully, but these errors were encountered: