Skip to content
Permalink
Browse files

Merge pull request #38 from ergebnis/fix/mapping

Fix: Use alias for now
  • Loading branch information
localheinz committed Mar 13, 2020
2 parents cca32a2 + a205cc8 commit 0873537e6bfdaf39357f22f254b12ff67bcaffbd
@@ -13,17 +13,17 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class Artist
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
}
@@ -13,28 +13,28 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class Badge
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
protected $id;

/**
* @ORM\Mapping\Column
* @ORM\Column
*/
protected $label;

/**
* @ORM\Mapping\ManyToOne(targetEntity="Person")
* @ORM\Mapping\JoinColumn(
* @ORM\ManyToOne(targetEntity="Person")
* @ORM\JoinColumn(
* name="person_id",
* referencedColumnName="id",
* nullable=true
@@ -13,17 +13,17 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class Commander
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(
* name="id",
* type="integer"
* )
@@ -33,7 +33,7 @@ class Commander
private $id;

/**
* @ORM\Mapping\Embedded(
* @ORM\Embedded(
* class="Ergebnis\FactoryBot\Test\Fixture\Entity\Name",
* columnPrefix=false
* )
@@ -13,15 +13,15 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Embeddable
* @ORM\Embeddable
*/
final class Name
{
/**
* @ORM\Mapping\Column(
* @ORM\Column(
* name="first_name",
* type="string",
* length=100,
@@ -33,7 +33,7 @@ final class Name
private $first;

/**
* @ORM\Mapping\Column(
* @ORM\Column(
* name="last_name",
* type="string",
* length=100,
@@ -13,31 +13,31 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class Person
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
protected $id;

/**
* @ORM\Mapping\Column
* @ORM\Column
*/
protected $name;

/**
* @ORM\Mapping\ManyToOne(
* @ORM\ManyToOne(
* targetEntity="SpaceShip",
* inversedBy="crew"
* )
* @ORM\Mapping\JoinColumn(
* @ORM\JoinColumn(
* name="spaceShip_id",
* referencedColumnName="id",
* nullable=true
@@ -13,17 +13,17 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity\Person;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class User
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
protected $id;
}
@@ -14,27 +14,27 @@
namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class SpaceShip
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
protected $id;

/**
* @ORM\Mapping\Column
* @ORM\Column
*/
protected $name;

/**
* @ORM\Mapping\OneToMany(
* @ORM\OneToMany(
* targetEntity="Person",
* mappedBy="spaceShip"
* )
@@ -13,22 +13,22 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

use Doctrine\ORM;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Mapping\Entity
* @ORM\Entity
*/
class SpaceStation
{
/**
* @ORM\Mapping\Id
* @ORM\Mapping\GeneratedValue(strategy="AUTO")
* @ORM\Mapping\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
protected $id;

/**
* @ORM\Mapping\Column
* @ORM\Column
*/
protected $name = 'Babylon5';

0 comments on commit 0873537

Please sign in to comment.
You can’t perform that action at this time.