Fixed definition of inversed many to many entity relationship

This commit is contained in:
Alejandro Celaya 2020-05-08 10:25:33 +02:00
parent 626c92460b
commit 9a78fd1a26

View File

@ -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');
};