-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#11 : Doctrine loader : allow to work with unparsed relation + allow …
…to pass null identifier for strict insertion
- Loading branch information
1 parent
b98102f
commit b2c1f19
Showing
6 changed files
with
170 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
|
||
namespace Smart\EtlBundle\Tests\Entity; | ||
|
||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Smart\EtlBundle\Entity\ImportableTrait; | ||
|
||
/** | ||
* @ORM\Entity() | ||
* @ORM\Table(name="etlbundle_organisation") | ||
*/ | ||
class Organisation | ||
{ | ||
use ImportableTrait; | ||
|
||
/** | ||
* @var int | ||
* | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
protected $id; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(type="string", length=255, nullable=false) | ||
*/ | ||
protected $name; | ||
|
||
/** | ||
* @var ArrayCollection | ||
* | ||
* @ORM\OneToMany(targetEntity="Smart\EtlBundle\Tests\Entity\Project", mappedBy="organisation") | ||
*/ | ||
protected $projects; | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @param int $id | ||
*/ | ||
public function setId($id) | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* @param string $name | ||
*/ | ||
public function setName($name) | ||
{ | ||
$this->name = $name; | ||
} | ||
|
||
/** | ||
* @return ArrayCollection | ||
*/ | ||
public function getProjects() | ||
{ | ||
return $this->projects; | ||
} | ||
|
||
/** | ||
* @param ArrayCollection $projects | ||
*/ | ||
public function setProjects($projects) | ||
{ | ||
$this->projects = $projects; | ||
} | ||
} |
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
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,4 @@ | ||
Smart\EtlBundle\Tests\Entity\Organisation: | ||
smartbooster: | ||
name: SMART BOOSTER | ||
import_id: smartbooster |