Skip to content

Commit c267afa

Browse files
committed
minor #21264 [Validator] UniqueEntity - add note about comparing files. (wkania)
This PR was merged into the 6.4 branch. Discussion ---------- [Validator] UniqueEntity - add note about comparing files. For ``binary`` and ``blob`` fields, instead of comparing large files directly, consider storing and comparing a hash (e.g., MD5) of the content in your custom ``repositoryMethod``. Commits ------- 6688d8b [Validator] UniqueEntity - add note about comparing files.
2 parents 7e052b9 + 6688d8b commit c267afa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,10 @@ blank, ``findBy()`` will be used. The method receives as its argument a
402402
fields configured in the ``fields`` option). The method should return a
403403
:phpfunction:`countable PHP variable <is_countable>`.
404404

405+
.. note::
406+
407+
For ``binary`` and ``blob`` fields, instead of comparing large files directly,
408+
consider storing and comparing a hash (e.g., MD5) of the content in your
409+
custom ``repositoryMethod``.
410+
405411
.. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition

0 commit comments

Comments
 (0)