Fix DDC440Test to comply with Oracle Identifier-Name Restrictions
This commit is contained in:
parent
5bebf13d58
commit
af59a581f0
@ -6,6 +6,7 @@ require_once __DIR__ . '/../../../TestInit.php';
|
|||||||
|
|
||||||
class DDC440Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
class DDC440Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
@ -72,15 +73,16 @@ class DDC440Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
$this->assertType('Doctrine\Tests\ORM\Functional\Ticket\DDC440Phone', $p2);
|
$this->assertType('Doctrine\Tests\ORM\Functional\Ticket\DDC440Phone', $p2);
|
||||||
$originalData = $uw->getOriginalEntityData($p2);
|
$originalData = $uw->getOriginalEntityData($p2);
|
||||||
$this->assertEquals($phone2->getNumber(), $originalData['number']);
|
$this->assertEquals($phone2->getNumber(), $originalData['number']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Entity
|
* @Entity
|
||||||
* @Table(name="phone")
|
* @Table(name="phone")
|
||||||
*/
|
*/
|
||||||
class DDC440Phone {
|
class DDC440Phone
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Column(name="id", type="integer")
|
* @Column(name="id", type="integer")
|
||||||
@ -88,7 +90,6 @@ class DDC440Phone {
|
|||||||
* @GeneratedValue(strategy="AUTO")
|
* @GeneratedValue(strategy="AUTO")
|
||||||
*/
|
*/
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ManyToOne(targetEntity="DDC440Client",inversedBy="phones")
|
* @ManyToOne(targetEntity="DDC440Client",inversedBy="phones")
|
||||||
* @JoinColumns({
|
* @JoinColumns({
|
||||||
@ -96,24 +97,25 @@ class DDC440Phone {
|
|||||||
* })
|
* })
|
||||||
*/
|
*/
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Column(name="number", type="string")
|
* @Column(name="phonenumber", type="string")
|
||||||
*/
|
*/
|
||||||
protected $number;
|
protected $number;
|
||||||
|
|
||||||
public function setNumber($value){
|
public function setNumber($value)
|
||||||
|
{
|
||||||
$this->number = $value;
|
$this->number = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNumber(){
|
public function getNumber()
|
||||||
|
{
|
||||||
return $this->number;
|
return $this->number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setClient(DDC440Client $value, $update_inverse=true)
|
public function setClient(DDC440Client $value, $update_inverse=true)
|
||||||
{
|
{
|
||||||
$this->client = $value;
|
$this->client = $value;
|
||||||
if($update_inverse){
|
if ($update_inverse) {
|
||||||
$value->addPhone($this);
|
$value->addPhone($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,16 +130,19 @@ class DDC440Phone {
|
|||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setId($value){
|
public function setId($value)
|
||||||
|
{
|
||||||
$this->id = $value;
|
$this->id = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Entity
|
* @Entity
|
||||||
* @Table(name="client")
|
* @Table(name="client")
|
||||||
*/
|
*/
|
||||||
class DDC440Client {
|
class DDC440Client
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Column(name="id", type="integer")
|
* @Column(name="id", type="integer")
|
||||||
@ -145,7 +150,6 @@ class DDC440Client {
|
|||||||
* @GeneratedValue(strategy="AUTO")
|
* @GeneratedValue(strategy="AUTO")
|
||||||
*/
|
*/
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @OneToOne(targetEntity="DDC440Phone", fetch="EAGER")
|
* @OneToOne(targetEntity="DDC440Phone", fetch="EAGER")
|
||||||
* @JoinColumns({
|
* @JoinColumns({
|
||||||
@ -153,27 +157,27 @@ class DDC440Client {
|
|||||||
* })
|
* })
|
||||||
*/
|
*/
|
||||||
protected $main_phone;
|
protected $main_phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @OneToMany(targetEntity="DDC440Phone", mappedBy="client", cascade={"persist", "remove"}, fetch="EAGER")
|
* @OneToMany(targetEntity="DDC440Phone", mappedBy="client", cascade={"persist", "remove"}, fetch="EAGER")
|
||||||
*/
|
*/
|
||||||
protected $phones;
|
protected $phones;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Column(name="name", type="string")
|
* @Column(name="name", type="string")
|
||||||
*/
|
*/
|
||||||
protected $name;
|
protected $name;
|
||||||
|
|
||||||
public function __construct(){
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setName($value){
|
public function setName($value)
|
||||||
|
{
|
||||||
$this->name = $value;
|
$this->name = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName()
|
||||||
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,11 +192,13 @@ class DDC440Client {
|
|||||||
return $this->phones;
|
return $this->phones;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMainPhone(DDC440Phone $value){
|
public function setMainPhone(DDC440Phone $value)
|
||||||
|
{
|
||||||
$this->main_phone = $value;
|
$this->main_phone = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMainPhone(){
|
public function getMainPhone()
|
||||||
|
{
|
||||||
return $this->main_phone;
|
return $this->main_phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +207,9 @@ class DDC440Client {
|
|||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setId($value){
|
public function setId($value)
|
||||||
|
{
|
||||||
$this->id = $value;
|
$this->id = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user