relationship definition improved with primaryjoin declaration