@@ -261,7 +261,17 @@ Storing DatePoints in the Database
261261~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262262
263263If you :doc: `use Doctrine </doctrine >` to work with databases, consider using the
264- ``date_point `` Doctrine type, which converts to/from ``DatePoint `` objects automatically::
264+ new Doctrine types:
265+
266+ ======================= ====================== =====
267+ DatePoint Doctrine type Extends Doctrine type Class
268+ ======================= ====================== =====
269+ ``date_point `` ``datetime_immutable `` :class: `Symfony\\ Bridge\\ Doctrine\\ Types\\ DatePointType `
270+ ``day_point `` ``date_immutable `` :class: `Symfony\\ Bridge\\ Doctrine\\ Types\\ DayPointType `
271+ ``time_point `` ``time_immutable `` :class: `Symfony\\ Bridge\\ Doctrine\\ Types\\ TimePointType `
272+ ======================= ====================== =====
273+
274+ They convert to/from ``DatePoint `` objects automatically::
265275
266276 // src/Entity/Product.php
267277 namespace App\Entity;
@@ -272,14 +282,20 @@ If you :doc:`use Doctrine </doctrine>` to work with databases, consider using th
272282 #[ORM\Entity]
273283 class Product
274284 {
275- // if you don't define the Doctrine type explicitly, Symfony will autodetect it :
285+ // if you don't define the Doctrine type explicitly, Symfony will autodetect 'date_point' :
276286 #[ORM\Column]
277287 private DatePoint $createdAt;
278288
279289 // if you prefer to define the Doctrine type explicitly:
280290 #[ORM\Column(type: 'date_point')]
281291 private DatePoint $updatedAt;
282292
293+ #[ORM\Column(type: 'day_point')]
294+ public DatePoint $birthday;
295+
296+ #[ORM\Column(type: 'time_point')]
297+ public DatePoint $openAt;
298+
283299 // ...
284300 }
285301
0 commit comments