<commit_before><?php

namespace Kunstmaan\NodeBundle\Entity;

use Kunstmaan\AdminBundle\Entity\AbstractEntity;
use Kunstmaan\NodeBundle\Form\NodeMenuTabTranslationAdminType;
use Kunstmaan\NodeBundle\Form\NodeMenuTabAdminType;
use Kunstmaan\NodeBundle\Entity\Node;
use Kunstmaan\NodeBundle\Form\NodeTranslationAdminType;
use Kunstmaan\NodeBundle\Helper\Slugifier;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\EntityManager;

/**
 * NodeTranslation
 *
 * @ORM\Entity(repositoryClass="Kunstmaan\NodeBundle\Repository\NodeTranslationRepository")
 * @ORM\Table(name="kuma_node_translations", uniqueConstraints={@ORM\UniqueConstraint(name="ix_kuma_node_translations_node_lang", columns={"node_id", "lang"})})
 * @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
 */
class NodeTranslation extends AbstractEntity
{

    /**
     * @var Node
     *
     * @ORM\ManyToOne(targetEntity="Node", inversedBy="nodeTranslations")
     * @ORM\JoinColumn(name="node_id", referencedColumnName="id")
     */
    protected $node;

    /**
     * @var string
     *
     * @ORM\Column(type="string")
     */
    protected $lang;

    /**
     * @var bool
     *
     * @ORM\Column(type="boolean")
     */
    protected $online = false;

    /**
     * @var string
     *
     * @ORM\Column(type="string")
     */
    protected $title;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $slug;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $url;

    /**
     * @var NodeVersion
     *
     * @ORM\ManyToOne(targetEntity="NodeVersion")
     * @ORM\JoinColumn(name="public_node_version_id", referencedColumnName="id")
     */
    protected $publicNodeVersion;

    /**
     * @var ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="NodeVersion", mappedBy="nodeTranslation")
     * @ORM\OrderBy({"created" = "DESC"})
     */
    protected $nodeVersions;

    /**
     * @var int
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    protected $weight;

    /**
     * contructor
     */
    public function __construct()
    {
        $this->nodeVersions = new ArrayCollection();
    }
<commit_msg>fix ordering nodeversions<commit_after><?php

namespace Kunstmaan\NodeBundle\Entity;

use Kunstmaan\AdminBundle\Entity\AbstractEntity;
use Kunstmaan\NodeBundle\Form\NodeMenuTabTranslationAdminType;
use Kunstmaan\NodeBundle\Form\NodeMenuTabAdminType;
use Kunstmaan\NodeBundle\Entity\Node;
use Kunstmaan\NodeBundle\Form\NodeTranslationAdminType;
use Kunstmaan\NodeBundle\Helper\Slugifier;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\EntityManager;

/**
 * NodeTranslation
 *
 * @ORM\Entity(repositoryClass="Kunstmaan\NodeBundle\Repository\NodeTranslationRepository")
 * @ORM\Table(name="kuma_node_translations", uniqueConstraints={@ORM\UniqueConstraint(name="ix_kuma_node_translations_node_lang", columns={"node_id", "lang"})})
 * @ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
 */
class NodeTranslation extends AbstractEntity
{

    /**
     * @var Node
     *
     * @ORM\ManyToOne(targetEntity="Node", inversedBy="nodeTranslations")
     * @ORM\JoinColumn(name="node_id", referencedColumnName="id")
     */
    protected $node;

    /**
     * @var string
     *
     * @ORM\Column(type="string")
     */
    protected $lang;

    /**
     * @var bool
     *
     * @ORM\Column(type="boolean")
     */
    protected $online = false;

    /**
     * @var string
     *
     * @ORM\Column(type="string")
     */
    protected $title;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $slug;

    /**
     * @var string
     *
     * @ORM\Column(type="string", nullable=true)
     */
    protected $url;

    /**
     * @var NodeVersion
     *
     * @ORM\ManyToOne(targetEntity="NodeVersion")
     * @ORM\JoinColumn(name="public_node_version_id", referencedColumnName="id")
     */
    protected $publicNodeVersion;

    /**
     * @var ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="NodeVersion", mappedBy="nodeTranslation")
     * @ORM\OrderBy({"created" = "ASC"})
     */
    protected $nodeVersions;

    /**
     * @var int
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    protected $weight;

    /**
     * contructor
     */
    public function __construct()
    {
        $this->nodeVersions = new ArrayCollection();
    }

{'fraction_non_alphanumeric': 0.14364397444371008, 'fraction_numerical': 0.0, 'mean_word_length': 3.101174345076784, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1080823', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1451, 'n_words': 198}