简体   繁体   中英

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*

Did you try with current() ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM