# Pastebin 1hPxjaPq the join should be something like: ``query = query.join( models.Share, models.ShareInstance.share_id == models.Share.id)``