Diesel inner_join fails with trait bound not satisfied

Hi there,

even though an inner_join in general works on one pair of tables it does not seem to work on another pair of tables even though they seem to be configured quite similar...

The schema definition looks like:

diesel::joinable!(course_date_participants -> courses (course_id));

The call like

course_date_participants::table.inner_join(courses::table)

raises the error:

the trait bound `course_date_participants::table: JoinTo<fn() -> <schema::courses::table as HasTable>::Table {<schema::courses::table as HasTable>::table}>` is not satisfied

I'm kinda out of ideas on how to solve this. Any help would be appreciated.

It's hard to answer this questions based on the minimal amount of content given. You might want to add a full example, standalone example of what fails and the complete error message as emitted by rustc.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.