Support custom primary keys in resource paths