1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/Doctrine/Tests/Models/Cache/AttractionInfo.php
2013-12-16 11:05:04 -05:00

54 lines
966 B
PHP

<?php
namespace Doctrine\Tests\Models\Cache;
/**
* @Cache
* @Entity
* @Table("cache_attraction_info")
* @InheritanceType("JOINED")
* @DiscriminatorMap({
* 1 = "AttractionContactInfo",
* 2 = "AttractionLocationInfo",
* })
*/
abstract class AttractionInfo
{
const CLASSNAME = __CLASS__;
/**
* @Id
* @GeneratedValue
* @Column(type="integer")
*/
protected $id;
/**
* @Cache
* @ManyToOne(targetEntity="Attraction", inversedBy="infos")
* @JoinColumn(name="attraction_id", referencedColumnName="id")
*/
protected $attraction;
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
public function getAttraction()
{
return $this->attraction;
}
public function setAttraction(Attraction $attraction)
{
$this->attraction = $attraction;
$attraction->addInfo($this);
}
}