-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
165 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
final class ManyToManyAssociationMapping extends AssociationMapping | ||
{ | ||
use ToManyAssociationMapping; | ||
|
||
/** | ||
* Specification of the join table and its join columns (foreign keys). | ||
* Only valid for many-to-many mappings. Note that one-to-many associations | ||
* can be mapped through a join table by simply mapping the association as | ||
* many-to-many with a unique constraint on the join table. | ||
*/ | ||
public JoinTableMapping $joinTable; | ||
|
||
public array|null $relationToSourceKeyColumns = null; | ||
public array|null $relationToTargetKeyColumns = null; | ||
|
||
public function toArray(): array | ||
{ | ||
$array = parent::toArray(); | ||
|
||
$array['joinTable'] = $this->joinTable->toArray(); | ||
|
||
return $array; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
final class ManyToOneAssociationMapping extends AssociationMapping | ||
{ | ||
use ToOneAssociationMapping; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
final class OneToManyAssociationMapping extends AssociationMapping | ||
{ | ||
use ToManyAssociationMapping; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
final class OneToOneAssociationMapping extends AssociationMapping | ||
{ | ||
use ToOneAssociationMapping; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
trait ToManyAssociationMapping | ||
{ | ||
/** | ||
* Specification of a field on target-entity that is used to index the | ||
* collection by. This field HAS to be either the primary key or a unique | ||
* column. Otherwise the collection does not contain all the entities that | ||
* are actually related. | ||
*/ | ||
public string|null $indexBy = null; | ||
|
||
/** | ||
* A map of field names (of the target entity) to sorting directions | ||
* | ||
* @var array<string, 'asc'|'desc'> | ||
*/ | ||
public array|null $orderBy = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\ORM\Mapping; | ||
|
||
trait ToOneAssociationMapping | ||
{ | ||
/** @var array<string, string> */ | ||
public array|null $sourceToTargetKeyColumns = null; | ||
|
||
/** @var array<string, string> */ | ||
public array|null $targetToSourceKeyColumns = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.