Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Routing / RoutingRoute.php
1 <?php
2
3 namespace Doctrine\Tests\Models\Routing;
4
5 use Doctrine\Common\Collections\ArrayCollection;
6
7 /**
8  * @Entity
9  */
10 class RoutingRoute
11 {
12     /**
13      * @Id
14      * @GeneratedValue
15      * @column(type="integer")
16      */
17     public $id;
18
19     /**
20      * @ManyToMany(targetEntity="RoutingLeg", cascade={"all"})
21      * @JoinTable(name="RoutingRouteLegs",
22      *     joinColumns={@JoinColumn(name="route_id", referencedColumnName="id")},
23      *     inverseJoinColumns={@JoinColumn(name="leg_id", referencedColumnName="id", unique=true)}
24      * )
25      * @OrderBy({"departureDate" = "ASC"})
26      */
27     public $legs;
28
29     /**
30      * @OneToMany(targetEntity="RoutingRouteBooking", mappedBy="route")
31      * @OrderBy({"passengerName" = "ASC"})
32      */
33     public $bookings = array();
34
35     public function __construct()
36     {
37         $this->legs = new ArrayCollection();
38     }
39 }