I think that you are going the wrong way to solve this.

I would leave the id as is in the database and create a separate field
"contract_id" that you
change the way you want. This number should be set only when the
contract is finalized.

I think that messing with the id directly will give you a lot of
headaches in the long run.

    gabriel


On May 23, 1:56 am, Mihai Rusoaie <mi...@rusoaie.com> wrote:
> Hello!
>
> Thanks, Gabriel! I will try that!
>
> Tom: we have a very twisted sales team :)
>
> We send the sales guys in the field with pre-filled contracts to be signed.
> We number these contracts each morning with consecutive numbers: 1,2,3,4 and
> we insert them in the DB and associate with potential customers. When they
> come back to the office in the evening we realise that customer with
> contract 2 changed his mind and do not want to sign, so the sales guy
> deletes it from the database. But the accounting cannot accept that a
> contract is missing from the numbering. And the MySQL autoincrement does not
> count that a number is missing so the next contract will have no. 5. Which
> has to be changed by our back-office support to "2". There would be another
> way not to use the id for contract number; but it's easier and more
> intuitive...
>
> Hope I was clear,
>
> Mihai Rusoaie
> +40 72 RUSOAIEwww.rusoaie.com

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to