2525
2626use Doctrine \Common \Collections ;
2727use Webpatser \Uuid \Uuid as UUID ;
28- use Doctrine \ORM \Mapping as ORM ;
28+ //use Doctrine\ORM\Mapping as ORM;
29+ #use Doctrine\ORM\Mapping;
2930
3031use Volkszaehler \Definition ;
3132
3637 *
3738 * @Annotation
3839 *
39- * @ORM\Entity
40- * @ORM\Table(name="entities")
41- * @ORM\InheritanceType("SINGLE_TABLE")
42- * @ORM\DiscriminatorColumn(name="class", type="string")
43- * @ORM\DiscriminatorMap({
40+ * @Doctrine\ ORM\Mapping \Entity
41+ * @Doctrine\ ORM\Mapping \Table(name="entities")
42+ * @Doctrine\ ORM\Mapping \InheritanceType("SINGLE_TABLE")
43+ * @Doctrine\ ORM\Mapping \DiscriminatorColumn(name="class", type="string")
44+ * @Doctrine\ ORM\Mapping \DiscriminatorMap({
4445 * "channel" = "Channel",
4546 * "aggregator" = "Aggregator"
4647 * })
47- * @ORM\HasLifecycleCallbacks
48+ * @Doctrine\ ORM\Mapping \HasLifecycleCallbacks
4849 */
4950abstract class Entity
5051{
52+ const UUID_LENGTH = 36 ;
53+
5154 /**
52- * @ORM\Id
53- * @ORM\Column(type="integer")
54- * @ORM\GeneratedValue(strategy="AUTO")
55+ * @Doctrine\ ORM\Mapping \Id
56+ * @Doctrine\ ORM\Mapping \Column(type="integer")
57+ * @Doctrine\ ORM\Mapping \GeneratedValue(strategy="AUTO")
5558 */
5659 protected $ id ;
5760
5861 /**
59- * @ORM\Column(type="string", length=36, nullable=false, unique=true)
62+ * Doctrine\ORM\Mapping\Column(type="string", length=36, nullable=false, unique=true)
63+ * @Doctrine\ORM\Mapping\Column(type="string", length=self::UUID_LENGTH, nullable=false, unique=true)
6064 */
6165 protected $ uuid ;
6266
6367 /**
64- * @ORM\Column(type="string", nullable=false)
68+ * @Doctrine\ ORM\Mapping \Column(type="string", nullable=false)
6569 */
6670 protected $ type ;
6771
6872 /**
69- * @ORM\OneToMany(targetEntity="Property", mappedBy="entity", cascade={"remove", "persist"}, orphanRemoval=true)
70- * @ORM\OrderBy({"key" = "ASC"})
73+ * @Doctrine\ ORM\Mapping \OneToMany(targetEntity="Property", mappedBy="entity", cascade={"remove", "persist"}, orphanRemoval=true)
74+ * @Doctrine\ ORM\Mapping \OrderBy({"key" = "ASC"})
7175 */
7276 protected $ properties = NULL ;
7377
7478 /**
75- * @ORM\ManyToMany(targetEntity="Aggregator", mappedBy="children")
79+ * @Doctrine\ ORM\Mapping \ManyToMany(targetEntity="Aggregator", mappedBy="children")
7680 */
7781 protected $ parents = NULL ;
7882
@@ -98,7 +102,7 @@ public function __construct($type)
98102 /**
99103 * Checks for required and invalid properties
100104 *
101- * @ORM\PrePersist
105+ * @Doctrine\ ORM\Mapping \PrePersist
102106 */
103107 public function checkProperties ()
104108 {
0 commit comments