Skip to content
Permalink
Browse files

Merge pull request #39 from ergebnis/fix/mapping

Fix: Configure mapping for classes used as entities
  • Loading branch information
localheinz committed Mar 13, 2020
2 parents 0873537 + 5fc0b69 commit 3c69f5cd086afcebfd5b9e2f5d9982e8fcb5b142
@@ -260,11 +260,6 @@ parameters:
count: 1
path: test/Fixture/Entity/Person.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\Entity\\\\Person\\\\User\\:\\:\\$id has no typehint specified\\.$#"
count: 1
path: test/Fixture/Entity/Person/User.php

-
message: "#^Property Ergebnis\\\\FactoryBot\\\\Test\\\\Fixture\\\\Entity\\\\SpaceShip\\:\\:\\$id has no typehint specified\\.$#"
count: 1
@@ -17,6 +17,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="artist")
*/
class Artist
{
@@ -17,6 +17,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="badge")
*/
class Badge
{
@@ -17,6 +17,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="commander")
*/
class Commander
{
@@ -13,6 +13,24 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

final class Group
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
* @ORM\Table(name="group")
*/
class Group
{
/**
* @ORM\Id
* @ORM\Column(type="string")
*
* @var string
*/
private $id;

public function __construct(string $id)
{
$this->id = $id;
}
}
@@ -17,6 +17,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="person")
*/
class Person
{
@@ -17,13 +17,20 @@

/**
* @ORM\Entity
* @ORM\Table(name="person_user")
*/
class User
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
* @ORM\Column(type="string")
*
* @var string
*/
protected $id;

public function __construct(string $id)
{
$this->id = $id;
}
}
@@ -18,6 +18,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="space_ship")
*/
class SpaceShip
{
@@ -17,6 +17,7 @@

/**
* @ORM\Entity
* @ORM\Table(name="space_station")
*/
class SpaceStation
{
@@ -13,6 +13,24 @@

namespace Ergebnis\FactoryBot\Test\Fixture\Entity;

final class User
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
* @ORM\Table(name="user")
*/
class User
{
/**
* @ORM\Id
* @ORM\Column(type="string")
*
* @var string
*/
private $id;

public function __construct(string $id)
{
$this->id = $id;
}
}

0 comments on commit 3c69f5c

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