@@ -115,9 +115,8 @@ UUID objects created with the ``Uuid`` class can use the following methods
115
115
Storing UUIDs in Databases
116
116
~~~~~~~~~~~~~~~~~~~~~~~~~~
117
117
118
- You can store UUID values as any other regular string/binary values in the database.
119
- However, if you :doc: `use Doctrine </doctrine >`, it's more convenient to use the
120
- special Doctrine types which convert to/from UUID objects automatically::
118
+ If you :doc: `use Doctrine </doctrine >`, consider using the ``uuid `` Doctrine
119
+ type, which converts to/from UUID objects automatically::
121
120
122
121
// src/Entity/Product.php
123
122
namespace App\Entity;
@@ -134,11 +133,6 @@ special Doctrine types which convert to/from UUID objects automatically::
134
133
*/
135
134
private $someProperty;
136
135
137
- /**
138
- * @ORM\Column(type="uuid_binary")
139
- */
140
- private $anotherProperty;
141
-
142
136
// ...
143
137
}
144
138
@@ -166,7 +160,7 @@ entity primary keys::
166
160
167
161
.. versionadded :: 5.2
168
162
169
- The UUID types and generators were introduced in Symfony 5.2.
163
+ The UUID type and generators were introduced in Symfony 5.2.
170
164
171
165
When using built-in Doctrine repository methods (e.g. ``findOneBy() ``), Doctrine
172
166
knows how to convert these UUID types to build the SQL query
@@ -260,9 +254,8 @@ ULID objects created with the ``Ulid`` class can use the following methods::
260
254
Storing ULIDs in Databases
261
255
~~~~~~~~~~~~~~~~~~~~~~~~~~
262
256
263
- You can store ULID values as any other regular string/binary values in the database.
264
- However, if you :doc: `use Doctrine </doctrine >`, it's more convenient to use the
265
- special Doctrine types which convert to/from ULID objects automatically::
257
+ If you :doc: `use Doctrine </doctrine >`, consider using the ``ulid `` Doctrine
258
+ type, which converts to/from ULID objects automatically::
266
259
267
260
// src/Entity/Product.php
268
261
namespace App\Entity;
@@ -279,11 +272,6 @@ special Doctrine types which convert to/from ULID objects automatically::
279
272
*/
280
273
private $someProperty;
281
274
282
- /**
283
- * @ORM\Column(type="ulid_binary")
284
- */
285
- private $anotherProperty;
286
-
287
275
// ...
288
276
}
289
277
@@ -310,7 +298,7 @@ entity primary keys::
310
298
311
299
.. versionadded :: 5.2
312
300
313
- The ULID types and generator were introduced in Symfony 5.2.
301
+ The ULID type and generator were introduced in Symfony 5.2.
314
302
315
303
When using built-in Doctrine repository methods (e.g. ``findOneBy() ``), Doctrine
316
304
knows how to convert these ULID types to build the SQL query
0 commit comments