Support for custom pk fields