1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php
2010-02-15 23:02:24 +00:00

39 lines
872 B
PHP

<?php
namespace Doctrine\Tests\Models\Routing;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity
*/
class RoutingRoute
{
/**
* @Id
* @generatedValue(strategy="AUTO")
* @column(type="integer")
*/
public $id;
/**
* @ManyToMany(targetEntity="RoutingLeg", cascade={"all"})
* @JoinTable(name="RoutingRouteLegs",
* joinColumns={@JoinColumn(name="route_id", referencedColumnName="id")},
* inverseJoinColumns={@JoinColumn(name="leg_id", referencedColumnName="id", unique=true)}
* )
* @OrderBy("departureDate ASC")
*/
public $legs;
/**
* @OneToMany(targetEntity="RoutingRouteBooking", mappedBy="route")
* @OrderBy("passengerName ASC")
*/
public $bookings = array();
public function __construct()
{
$this->legs = new ArrayCollection();
}
}