#1277 DDC-3346 DDC-3531 - refactoring test assets for readability
This commit is contained in:
parent
36bc448880
commit
04a271a04e
@ -8,21 +8,20 @@ namespace Doctrine\Tests\Models\DDC3346;
|
||||
*/
|
||||
class DDC3346Article
|
||||
{
|
||||
const CLASSNAME = 'Doctrine\Tests\Models\DDC3346\DDC3346Article';
|
||||
const CLASSNAME = __CLASS__;
|
||||
|
||||
/**
|
||||
* @Id
|
||||
* @Column(type="integer")
|
||||
* @GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var DDC3346Author
|
||||
*
|
||||
* @ManyToOne(targetEntity="DDC3346Author", inversedBy="articles")
|
||||
* @JoinColumn(name="user_id", referencedColumnName="id")
|
||||
*/
|
||||
public $user;
|
||||
|
||||
public function setAuthor(DDC3346Author $author)
|
||||
{
|
||||
$this->user = $author;
|
||||
}
|
||||
}
|
||||
|
@ -8,18 +8,21 @@ namespace Doctrine\Tests\Models\DDC3346;
|
||||
*/
|
||||
class DDC3346Author
|
||||
{
|
||||
const CLASSNAME = 'Doctrine\Tests\Models\DDC3346\DDC3346Author';
|
||||
const CLASSNAME = __CLASS__;
|
||||
|
||||
/**
|
||||
* @Id @Column(type="integer")
|
||||
* @GeneratedValue
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @Column(type="string", length=255, unique=true)
|
||||
*/
|
||||
public $username;
|
||||
|
||||
/**
|
||||
* @OneToMany(targetEntity="DDC3346Article", mappedBy="user", fetch="EAGER", cascade={"detach"})
|
||||
*/
|
||||
public $articles;
|
||||
public $articles = array();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user