Retrieving only the id when querying.