I would like to have a field jobid in my data object which should be a number, unique and auto generated on object creation. The field will be read only for pimcore users.
For this case I thought to use the auto increment mysql feature on a standard numeric data object field. But I don’t know how to add the auto increment feature for this field in my bundle, because I don’t want to add the feature manually via phpmyadmin.
The job class is imported via bundle installer which works fine.
I already tried an eventListener on object Add event but I didn’t know how to generate a unique, increment number in this state in php so I moved to the auto increment solution.
Do you have an idea?
Thank you in advance for any help!