DDC117Link.php 637B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Doctrine\Tests\Models\DDC117;
  3. /**
  4. * Foreign Key Entity without additional fields!
  5. *
  6. * @Entity
  7. */
  8. class DDC117Link
  9. {
  10. /**
  11. * @Id
  12. * @ManyToOne(targetEntity="DDC117Article", inversedBy="links")
  13. * @JoinColumn(name="source_id", referencedColumnName="article_id")
  14. */
  15. public $source;
  16. /**
  17. * @Id
  18. * @ManyToOne(targetEntity="DDC117Article")
  19. * @JoinColumn(name="target_id", referencedColumnName="article_id")
  20. */
  21. public $target;
  22. public function __construct($source, $target, $description)
  23. {
  24. $this->source = $source;
  25. $this->target = $target;
  26. }
  27. }