Skip to content

Commit 85fbc41

Browse files
committed
Use xml doctrine orm mapping
1 parent a1f8cf6 commit 85fbc41

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
3+
<!--
4+
References :
5+
xsd : https://github.com/doctrine/doctrine2/blob/master/doctrine-mapping.xsd
6+
xml mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/xml-mapping/en
7+
association mapping : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/association-mapping/en
8+
-->
9+
<entity
10+
name="App\Entity\SonataNotificationMessage"
11+
table="notification__message"
12+
repository-class="Doctrine\ORM\EntityRepository">
13+
14+
<id name="id" type="integer" column="id">
15+
<generator strategy="AUTO"/>
16+
</id>
17+
</entity>
18+
</doctrine-mapping>

sonata-project/notification-bundle/3.4/src/Entity/SonataNotificationMessage.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,18 @@
22

33
namespace App\Entity;
44

5-
use Doctrine\ORM\Mapping as ORM;
6-
use Sonata\NotificationBundle\Entity\BaseMessage;
7-
8-
/**
9-
* @ORM\Entity
10-
* @ORM\Table(name="notification__message")
11-
*/
125
class SonataNotificationMessage extends BaseMessage
136
{
147
/**
15-
* @ORM\Id
16-
* @ORM\Column(type="integer")
17-
* @ORM\GeneratedValue(strategy="AUTO")
18-
* @var int
8+
* @var int $id
199
*/
2010
protected $id;
2111

12+
/**
13+
* Get id.
14+
*
15+
* @return int $id
16+
*/
2217
public function getId()
2318
{
2419
return $this->id;

0 commit comments

Comments
 (0)