Updated hibernate criteria to match with the new relationship (mainstore-substore as many to many)