<commit_before><?php declare(strict_types=1);


namespace TemplateNamespace\Entities\Relations\TemplateEntity\Traits\HasTemplateEntities;


use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
use TemplateNamespace\Entities\TemplateEntity;
use TemplateNamespace\Entities\Relations\TemplateEntity\Traits\HasTemplateEntitiesAbstract;

trait HasTemplateEntitiesInverseManyToMany
{
    use HasTemplateEntitiesAbstract;

    public static function getPropertyMetaForTemplateEntities(ClassMetadataBuilder $builder)
    {
        $builder = $builder->createManyToMany(
            TemplateEntity::getPlural(), TemplateEntity::class
        );
        $builder->mappedBy(static::getPlural());
        $builder->setJoinTable(TemplateEntity::getPlural() . '_to_' . static::getPlural());
        $builder->addJoinColumn(
            TemplateEntity::getSingular() . '_' . TemplateEntity::getIdField(),
            TemplateEntity::getIdField()
        );
        $builder->addInverseJoinColumn(
            static::getSingular() . '_' . static::getIdField(),
            static::getIdField()
        );
        $builder->build();
    }
}<commit_msg>fixing join columns<commit_after><?php declare(strict_types=1);


namespace TemplateNamespace\Entities\Relations\TemplateEntity\Traits\HasTemplateEntities;


use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
use TemplateNamespace\Entities\TemplateEntity;
use TemplateNamespace\Entities\Relations\TemplateEntity\Traits\HasTemplateEntitiesAbstract;

trait HasTemplateEntitiesInverseManyToMany
{
    use HasTemplateEntitiesAbstract;

    public static function getPropertyMetaForTemplateEntities(ClassMetadataBuilder $builder)
    {
        $builder = $builder->createManyToMany(
            TemplateEntity::getPlural(), TemplateEntity::class
        );
        $builder->mappedBy(static::getPlural());
        $builder->setJoinTable(TemplateEntity::getPlural() . '_to_' . static::getPlural());
        $builder->addJoinColumn(
            static::getSingular() . '_' . static::getIdField(),
            static::getIdField()
        );
        $builder->addInverseJoinColumn(
            TemplateEntity::getSingular() . '_' . TemplateEntity::getIdField(),
            TemplateEntity::getIdField()
        );
        $builder->build();
    }
}
{'fraction_non_alphanumeric': 0.11568799298860649, 'fraction_numerical': 0.0008764241893076249, 'mean_word_length': 3.8678038379530917, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '3879185', 'n_tokens_mistral': 586, 'n_tokens_neox': 602, 'n_words': 74}