2011-07-28 12:46:38 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\Models\Legacy;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Entity
|
|
|
|
* @Table(name="legacy_articles")
|
|
|
|
*/
|
|
|
|
class LegacyArticle
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @Id
|
|
|
|
* @Column(name="iArticleId", type="integer")
|
|
|
|
* @GeneratedValue(strategy="AUTO")
|
|
|
|
*/
|
2011-07-28 14:25:23 +04:00
|
|
|
public $_id;
|
2011-07-28 12:46:38 +04:00
|
|
|
/**
|
|
|
|
* @Column(name="sTopic", type="string", length=255)
|
|
|
|
*/
|
2011-07-28 14:25:23 +04:00
|
|
|
public $_topic;
|
2011-07-28 12:46:38 +04:00
|
|
|
/**
|
|
|
|
* @Column(name="sText", type="text")
|
|
|
|
*/
|
2011-07-28 14:25:23 +04:00
|
|
|
public $_text;
|
2011-07-28 12:46:38 +04:00
|
|
|
/**
|
2011-07-28 14:25:23 +04:00
|
|
|
* @ManyToOne(targetEntity="LegacyUser", inversedBy="_articles")
|
2011-07-28 12:46:38 +04:00
|
|
|
* @JoinColumn(name="iUserId", referencedColumnName="iUserId")
|
|
|
|
*/
|
2011-07-28 14:25:23 +04:00
|
|
|
public $_user;
|
2011-07-28 12:46:38 +04:00
|
|
|
public function setAuthor(LegacyUser $author) {
|
2011-07-28 14:25:23 +04:00
|
|
|
$this->_user = $author;
|
2011-07-28 12:46:38 +04:00
|
|
|
}
|
|
|
|
}
|