<commit_before><?php

namespace Victoire\Bundle\QueryBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity;

/**
 * Query trait adds the query fields.
 */
trait QueryTrait
{
    /**
     * @var string
     *
     * @ORM\Column(name="query", type="text", nullable=true)
     */
    protected $query;

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

    /**
     * @deprecated
     *  Auto list mode: businessentity type.
     *
     * @var string
     * @ORM\Column(name="business_entity_name", type="string", nullable=true)
     */
    protected $businessEntityName;
    /**
     * @ORM\ManyToOne(targetEntity="Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity", cascade={"persist"})
     * @ORM\JoinColumn(name="related_business_entity_id", referencedColumnName="id", onDelete="CASCADE")
     */
    protected $businessEntity;

    /**
     * Get query.
     *
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * Set query.
     *
     * @param string $query
     */
    public function setQuery($query)
    {
        $this->query = $query;
    }

    /**
     * Get orderBy.
     *
     * @return string
     */
    public function getOrderBy()
    {
        return $this->orderBy;
    }

    /**
     * Set orderBy.
     *
     * @param string $orderBy
     */
    public function setOrderBy($orderBy)
    {
        $this->orderBy = $orderBy;
    }

    /**
     * @deprecated
     * Get businessEntityName.
     *
     * @return int
     */
    public function getOldBusinessEntityName()
    {
        return $this->businessEntityName;
    }

    /**
     * Get businessEntityName.
     *
     * @return int
     */
    public function getBusinessEntityName()
    {
        return $this->getBusinessEntity()->getName();
    }

    /**
     * @return mixed
     */
    public function getBusinessEntity()
    {
        return $this->businessEntity;
    }

    /**
     * @param BusinessEntity $businessEntity
     */
    public function setBusinessEntity(BusinessEntity $businessEntity)
    {
        $this->businessEntity = $businessEntity;
    }
}
<commit_msg>use the '_id' table name to avoid conflict in migration<commit_after><?php

namespace Victoire\Bundle\QueryBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity;

/**
 * Query trait adds the query fields.
 */
trait QueryTrait
{
    /**
     * @var string
     *
     * @ORM\Column(name="query", type="text", nullable=true)
     */
    protected $query;

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

    /**
     * @deprecated
     *  Auto list mode: businessentity type.
     *
     * @var string
     * @ORM\Column(name="business_entity_id", type="string", nullable=true)
     */
    protected $businessEntityName;
    /**
     * @ORM\ManyToOne(targetEntity="Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity", cascade={"persist"})
     * @ORM\JoinColumn(name="related_business_entity_id", referencedColumnName="id", onDelete="CASCADE")
     */
    protected $businessEntity;

    /**
     * Get query.
     *
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * Set query.
     *
     * @param string $query
     */
    public function setQuery($query)
    {
        $this->query = $query;
    }

    /**
     * Get orderBy.
     *
     * @return string
     */
    public function getOrderBy()
    {
        return $this->orderBy;
    }

    /**
     * Set orderBy.
     *
     * @param string $orderBy
     */
    public function setOrderBy($orderBy)
    {
        $this->orderBy = $orderBy;
    }

    /**
     * @deprecated
     * Get businessEntityName.
     *
     * @return int
     */
    public function getOldBusinessEntityName()
    {
        return $this->businessEntityName;
    }

    /**
     * Get businessEntityName.
     *
     * @return int
     */
    public function getBusinessEntityName()
    {
        return $this->getBusinessEntity()->getName();
    }

    /**
     * @return mixed
     */
    public function getBusinessEntity()
    {
        return $this->businessEntity;
    }

    /**
     * @param BusinessEntity $businessEntity
     */
    public function setBusinessEntity(BusinessEntity $businessEntity)
    {
        $this->businessEntity = $businessEntity;
    }
}

{'fraction_non_alphanumeric': 0.1317391304347826, 'fraction_numerical': 0.0, 'mean_word_length': 2.1004043126684637, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6801921', 'n_tokens_mistral': 1424, 'n_tokens_neox': 1381, 'n_words': 257}