Generating for queryUniqueByField()