Fallback to resource.id when cannot read resource[pk]