Skip to content

Commit 895ed60

Browse files
authored
Merge pull request #25 from Janice38/bugfix/entity-oro-6.0
bugfix - entity-oro-6.0 : fix entity frontend owner type
2 parents cfc9362 + 98c6ba5 commit 895ed60

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

src/Synolia/Bundle/FavoriteBundle/Entity/Favorite.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'ownership' => [
2222
'organization_field_name' => 'organization',
2323
'organization_column_name' => 'organization_id',
24-
'frontend_owner_type' => 'FRONTEND_CUSTOMER',
24+
'frontend_owner_type' => 'FRONTEND_USER',
2525
'frontend_owner_field_name' => 'customerUser',
2626
'frontend_owner_column_name' => 'customer_user_id', ],
2727
'security' => [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Synolia\Bundle\FavoriteBundle\Migrations\Schema\v1_3;
4+
5+
use Doctrine\DBAL\Schema\Schema;
6+
use Oro\Bundle\ContactUsBundle\Entity\ContactRequest;
7+
use Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigEntityValueQuery;
8+
use Oro\Bundle\MigrationBundle\Migration\Extension\RenameExtension;
9+
use Oro\Bundle\MigrationBundle\Migration\Extension\RenameExtensionAwareInterface;
10+
use Oro\Bundle\MigrationBundle\Migration\Migration;
11+
use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface;
12+
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
13+
use Synolia\Bundle\FavoriteBundle\Entity\Favorite;
14+
15+
class UpdateOwnerField implements Migration
16+
{
17+
public function up(Schema $schema, QueryBag $queries): void
18+
{
19+
$queries->addPostQuery(new UpdateEntityConfigEntityValueQuery(
20+
Favorite::class,
21+
'ownership',
22+
'frontend_owner_type',
23+
'FRONTEND_USER'
24+
));
25+
}
26+
}

0 commit comments

Comments
 (0)