[Dbix-class] how to avoid adding duplicate row to table containing unique field/column

Fahad Khan fahad.a.khan at hotmail.com
Wed Oct 12 15:56:20 GMT 2011

On Wed, Oct 12, 2011 at 4:33 PM, Rajeev Prasad <rp.neuli at yahoo.com> wrote:

> Hello,
> In my test script below, i am trying to figure out how to suppress the
> error mesg when the the script try to add a previously presen tentry into
> the table.
> OR better even, to make sure that the script should not even try to update
> the table, if the record is already present in table. (table may grow very
> big in future).
Hi Rajeev,

Sorry that I am not answering your question directly. As this appears to be
for testing, consider writing your test such that it cleans up after itself
and reverts any changes to the database. This will also help avoid tests
failing intermittently.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20111012/f88=

More information about the DBIx-Class mailing list