part of JoinBy code.
added group relation via joinBy relationship.