Query by type and id added