blog-bundle icon indicating copy to clipboard operation
blog-bundle copied to clipboard

ItemExistsException when creating a post with the title and date matching another record

Open alebo opened this issue 11 years ago • 4 comments

alebo avatar Oct 03 '13 21:10 alebo

odd - it should add an auto_incrementing number to the post title: https://github.com/symfony-cmf/BlogBundle/blob/master/Resources/config/routing/autoroute_default.yml#L52

dantleech avatar Oct 04 '13 06:10 dantleech

As far as I understand that auto_incrementing setting applies only to the route naming. And the exception is thrown due to the content node names.

alebo avatar Oct 04 '13 19:10 alebo

@alebo can you dig into this? we are currently focusing on other Bundles for the first stable release.

lsmith77 avatar Oct 06 '13 18:10 lsmith77

@alebo I think your right - in that case what we probably need is something like the Doctrine ORM UniqueEntity validator:

https://github.com/symfony/DoctrineBridge/blob/master/Validator/Constraints/UniqueEntity.php

in the DoctrinePhpcrOdmBundle:

https://github.com/doctrine/DoctrinePHPCRBundle/tree/master/Validator/Constraints

dantleech avatar Oct 06 '13 18:10 dantleech