https://devhubby.com/thread/how-to-add-a-condition-to-a-relation-query-in