Added unique parameter for query to distinguish query on one or multiple objects