From 9a78fd1a261441919daffabbe44c9d5f0905fe67 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 8 May 2020 10:25:33 +0200 Subject: [PATCH] Fixed definition of inversed many to many entity relationship --- .../entities-mappings/Shlinkio.Shlink.Core.Entity.Tag.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Entity.Tag.php b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Entity.Tag.php index c3104a9d..97d15758 100644 --- a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Entity.Tag.php +++ b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Entity.Tag.php @@ -25,9 +25,5 @@ return static function (ClassMetadata $metadata, array $emConfig): void { ->unique() ->build(); - $builder->createManyToMany('shortUrls', Entity\ShortUrl::class) - ->setJoinTable(determineTableName('short_urls_in_tags', $emConfig)) - ->addInverseJoinColumn('short_url_id', 'id', true, false, 'CASCADE') - ->addJoinColumn('tag_id', 'id', true, false, 'CASCADE') - ->build(); + $builder->addInverseManyToMany('shortUrls', Entity\ShortUrl::class, 'tags'); };