I’m trying to do a join on a table so that I can filter records but not actually selecting from that table. Here’s the example where it’s still selecting from the joined table. I assume you can manually specify the select using tuples but is there a way to do this using a Queryable struct instead?
let (existing_excerpt, _) = source_items::table
.inner_join(sources::table)
.filter(source_items::id.eq(json.original_excerpt_id))
.filter(sources::user_id.eq(jwt.user_id))
.first::<(SourceItem, Source)>(&db.0)
.map_err(PostError::LoadSourceID)?;
Any advice? Thanks.