Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Entity/ScreenLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class ScreenLayout extends AbstractBaseEntity implements MultiTenantInterface, R
/**
* @var Collection<int, Screen>
*/
#[ORM\OneToMany(targetEntity: Screen::class, mappedBy: 'screenLayout')]
#[ORM\OneToMany(mappedBy: 'screenLayout', targetEntity: Screen::class, fetch: 'EXTRA_LAZY')]
private Collection $screens;

/**
* @var Collection<int, ScreenLayoutRegions>
*/
#[ORM\OneToMany(targetEntity: ScreenLayoutRegions::class, mappedBy: 'screenLayout')]
#[ORM\OneToMany(targetEntity: ScreenLayoutRegions::class, fetch: 'EXTRA_LAZY', mappedBy: 'screenLayout')]
private Collection $regions;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ScreenLayoutRegions.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ScreenLayoutRegions extends AbstractBaseEntity implements MultiTenantInter
/**
* @var Collection<int, PlaylistScreenRegion>
*/
#[ORM\OneToMany(targetEntity: PlaylistScreenRegion::class, cascade: ['persist', 'remove'], mappedBy: 'region', orphanRemoval: true)]
#[ORM\OneToMany(targetEntity: PlaylistScreenRegion::class, fetch: 'EXTRA_LAZY', cascade: ['persist', 'remove'], mappedBy: 'region', orphanRemoval: true)]
private Collection $playlistScreenRegions;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Template extends AbstractBaseEntity implements MultiTenantInterface, Relat
/**
* @var Collection<int, Slide>
*/
#[ORM\OneToMany(targetEntity: Slide::class, mappedBy: 'template')]
#[ORM\OneToMany(mappedBy: 'template', targetEntity: Slide::class, fetch: 'EXTRA_LAZY')]
private Collection $slides;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tenant.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Tenant extends AbstractBaseEntity implements \JsonSerializable
/**
* @var Collection<int, UserRoleTenant>
*/
#[ORM\OneToMany(targetEntity: UserRoleTenant::class, mappedBy: 'tenant', orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'tenant', targetEntity: UserRoleTenant::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $userRoleTenants;

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)]
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tenant/FeedSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FeedSource extends AbstractTenantScopedEntity implements RelationsChecksum
/**
* @var Collection<int, Feed>
*/
#[ORM\OneToMany(targetEntity: Feed::class, mappedBy: 'feedSource', orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'feedSource', targetEntity: Feed::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $feeds;

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tenant/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Media extends AbstractTenantScopedEntity implements RelationsChecksumInter
/**
* @var Collection<int, Slide>
*/
#[ORM\ManyToMany(targetEntity: Slide::class, mappedBy: 'media')]
#[ORM\ManyToMany(targetEntity: Slide::class, mappedBy: 'media', fetch: 'EXTRA_LAZY')]
private Collection $slides;

public function __construct()
Expand Down
10 changes: 5 additions & 5 deletions src/Entity/Tenant/Playlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@ class Playlist extends AbstractTenantScopedEntity implements MultiTenantInterfac
/**
* @var Collection<int, ScreenCampaign>
*/
#[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenCampaign::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenCampaign::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $screenCampaigns;

/**
* @var Collection<int, ScreenGroupCampaign>
*/
#[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenGroupCampaign::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'campaign', targetEntity: ScreenGroupCampaign::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $screenGroupCampaigns;

/**
* @var Collection<int, PlaylistScreenRegion>
*/
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistScreenRegion::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistScreenRegion::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $playlistScreenRegions;

/**
* @var Collection<int, PlaylistSlide>
*/
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistSlide::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: PlaylistSlide::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
#[ORM\OrderBy(['weight' => Order::Ascending->value])]
private Collection $playlistSlides;

/**
* @var Collection<int, Schedule>
*/
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: Schedule::class, cascade: ['persist'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'playlist', targetEntity: Schedule::class, cascade: ['persist'], fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $schedules;

public function __construct()
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/Tenant/Screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ class Screen extends AbstractTenantScopedEntity implements RelationsChecksumInte
/**
* @var Collection<int, ScreenCampaign>
*/
#[ORM\OneToMany(mappedBy: 'screen', targetEntity: ScreenCampaign::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'screen', targetEntity: ScreenCampaign::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $screenCampaigns;

/**
* @var Collection<int, PlaylistScreenRegion>
*/
#[ORM\OneToMany(mappedBy: 'screen', targetEntity: PlaylistScreenRegion::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'screen', targetEntity: PlaylistScreenRegion::class, cascade: ['persist', 'remove'], fetch: 'EXTRA_LAZY', orphanRemoval: true)]
#[ORM\OrderBy(['weight' => \Doctrine\Common\Collections\Order::Ascending->value])]
private Collection $playlistScreenRegions;

/**
* @var Collection<int, ScreenGroup>
*/
#[ORM\ManyToMany(targetEntity: ScreenGroup::class, mappedBy: 'screens')]
#[ORM\ManyToMany(targetEntity: ScreenGroup::class, mappedBy: 'screens', fetch: 'EXTRA_LAZY')]
private Collection $screenGroups;

public function __construct()
Expand Down
4 changes: 2 additions & 2 deletions src/Entity/Tenant/ScreenGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class ScreenGroup extends AbstractTenantScopedEntity implements RelationsChecksu
/**
* @var Collection<int, ScreenGroupCampaign>
*/
#[ORM\OneToMany(mappedBy: 'screenGroup', targetEntity: ScreenGroupCampaign::class, orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'screenGroup', targetEntity: ScreenGroupCampaign::class, fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $screenGroupCampaigns;

/**
* @var Collection<int, Screen>
*/
#[ORM\ManyToMany(targetEntity: Screen::class, inversedBy: 'screenGroups')]
#[ORM\ManyToMany(targetEntity: Screen::class, inversedBy: 'screenGroups', fetch: 'EXTRA_LAZY')]
private Collection $screens;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tenant/Slide.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Slide extends AbstractTenantScopedEntity implements RelationsChecksumInter
/**
* @var Collection<int, Media>
*/
#[ORM\ManyToMany(targetEntity: Media::class, inversedBy: 'slides')]
#[ORM\ManyToMany(targetEntity: Media::class, inversedBy: 'slides', fetch: 'EXTRA_LAZY')]
private Collection $media;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Tenant/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Theme extends AbstractTenantScopedEntity implements RelationsChecksumInter
/**
* @var Collection<int, Slide>
*/
#[ORM\OneToMany(mappedBy: 'theme', targetEntity: Slide::class)]
#[ORM\OneToMany(mappedBy: 'theme', targetEntity: Slide::class, fetch: 'EXTRA_LAZY')]
private Collection $slides;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Traits/MultiTenantTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait MultiTenantTrait
/**
* @var Collection<int, Tenant>
*/
#[ORM\ManyToMany(targetEntity: Tenant::class)]
#[ORM\ManyToMany(targetEntity: Tenant::class, fetch: 'EXTRA_LAZY')]
private Collection $tenants;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class User extends AbstractBaseEntity implements UserInterface, PasswordAuthenti
/**
* @var Collection<int, UserRoleTenant>
*/
#[ORM\OneToMany(targetEntity: UserRoleTenant::class, mappedBy: 'user', cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserRoleTenant::class, cascade: ['persist', 'remove'], fetch: 'EXTRA_LAZY', orphanRemoval: true)]
private Collection $userRoleTenants;

#[ORM\Column(type: Types::STRING)]
Expand Down
Loading