dev/core/issues/743, Donot join relationship table when not required