Sunday, June 29, 2014

Re: database table locking across supported database

Put a unique index on your receipt_number column, then when you grab the highest receipt_number, increases it and saves it, you will either succeed or get an error.

The error you have to catch, and redo the process, until you successfully have saved your new receipt_number.

Just my thoughts :) Enjoy, John

On Sunday, 29 June 2014 08:34:14 UTC+3, Prashant wrote:
Hi,

On Sun, Jun 29, 2014 at 11:01 AM, Prashant Shah <pshah....@gmail.com> wrote:
> Hi,
>
> http://docs.doctrine-project.org/en/2.0.x/reference/transactions-and-concurrency.html
>

Check the Locking support section.

There are many such use cases within my application that I need
locking at database level.

Regards.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: