Adjust query for id property