LegacyArticle.php 690B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Doctrine\Tests\Models\Legacy;
  3. /**
  4. * @Entity
  5. * @Table(name="legacy_articles")
  6. */
  7. class LegacyArticle
  8. {
  9. /**
  10. * @Id
  11. * @Column(name="iArticleId", type="integer")
  12. * @GeneratedValue(strategy="AUTO")
  13. */
  14. public $_id;
  15. /**
  16. * @Column(name="sTopic", type="string", length=255)
  17. */
  18. public $_topic;
  19. /**
  20. * @Column(name="sText", type="text")
  21. */
  22. public $_text;
  23. /**
  24. * @ManyToOne(targetEntity="LegacyUser", inversedBy="_articles")
  25. * @JoinColumn(name="iUserId", referencedColumnName="iUserId")
  26. */
  27. public $_user;
  28. public function setAuthor(LegacyUser $author) {
  29. $this->_user = $author;
  30. }
  31. }