Search code examples
symfonyalice-fixtures

Symfony Alice Bundle


Hi I'm using Alice Bundle in my Symfony2 project.

I would like to have an auto increment for my position property.

But I don't find the right syntax.

FM\AppBundle\Entity\Faq\Question:
    FaqQuestion_{1..100}:
        headline: <sentence()>
        body: <sentence()>
        position: <autoincrement()> #Does not work
        category: @FaqCategory*

Solution

  • Did you try with current() ?

    FM\AppBundle\Entity\Faq\Question:
    FaqQuestion_{1..100}:
        headline: <sentence()>
        body: <sentence()>
        position: <current()>
        category: @FaqCategory*