<commit_before>{% extends '../CommonAdmin/EditAction/EditBuilderAction.php.twig' %}
{% block getObject -%}
    protected function getObject($pk)
    {
        return $this->getDocumentManager()
                    ->getRepository('{{ model }}')
                    ->find($pk);
    }
{% endblock %}

{% block saveObject -%}
    protected function saveObject(\{{ model }} ${{ builder.ModelClass }})
    {
        $dm = $this->getDocumentManager();<commit_msg>Fix NotFoundException when using auto incremental id<commit_after>{% extends '../CommonAdmin/EditAction/EditBuilderAction.php.twig' %}
{% block getObject -%}
    protected function getObject($pk)
    {
        $pk = is_numeric($pk) ? intval($pk) : $pk;

        return $this->getDocumentManager()
                    ->getRepository('{{ model }}')
                    ->find($pk);
    }
{% endblock %}

{% block saveObject -%}
    protected function saveObject(\{{ model }} ${{ builder.ModelClass }})
    {
        $dm = $this->getDocumentManager();
{'fraction_non_alphanumeric': 0.16683217477656406, 'fraction_numerical': 0.0, 'mean_word_length': 2.587188612099644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6437272', 'n_tokens_mistral': 294, 'n_tokens_neox': 275, 'n_words': 55}