Subject: | BUG in Dancer::Plugin::Database::Core::Handle quick_update jumbles params |
Date: | Fri, 22 May 2015 11:34:58 +0100 |
To: | bug-Dancer-Plugin-Database-Core [...] rt.cpan.org, davidp [...] preshweb.co.uk |
From: | Nick Mailer <nickm [...] positive-internet.com> |
Hi,
Just to let you know that the quick_update convenience method in
Dancer::Plugin::Database::Core::Handle randomly jumbles the params and
the associated values, so that query does not properly associate the
paramters and database values with the associative hash key and value:
eg:
my %person=(firstname=>'John', lastname=>'Smith', age=>23);
Database->quick_update('person', {id => 'johnsmith'}, \%person );
In this example code, your module does not properly associate
placeholders with the proper hash value. It places random hash values in
the resulting "SET" clauses, so that sometimes the firstname gets set to
'23', sometimes the lastname gets set to 'John' etc. It does it
different every time.
Thanks,
Nick
--
All postal correspondence to:
The Positive Internet Company, 24 Ganton Street, London. W1F 7QY
*Follow us on Twitter* @posipeople
The Positive Internet Company Limited is registered in England and Wales.
Registered company number: 3673639. VAT no: 726 7072 28.
Registered office: Northside House, Mount Pleasant, Barnet, Herts, EN4 9EE.