[Dbix-class] row update error
Michael Blanco
blanco217 at gmail.com
Fri Mar 5 15:57:34 GMT 2010
Hi,
I received the error below running this update:
$lineitem->update({
'last_mod_date' =3D> $now,
'creative_rcpt_date' =3D> $now,
});
Error with 1239848: DBIx::Class::Relationship::
CascadeActions::update(): DBI Exception: DBD::Oracle::st execute failed:
ORA-01858: a non-numeric character was found where a numeric was expected (
DBD ERROR: error possibly near <*> indicator at char 25 in
'UPDATE order_lineitem SET<*> creative_rcpt_date =3D :p1, last_mod_date =3D=
:p2
WHERE ( lineitem_id =3D :p3 )')
[for Statement "UPDATE order_lineitem SET creative_rcpt_date =3D ?,
last_mod_date =3D ? WHERE ( lineitem_id =3D ? )"
with ParamValues: :p1=3D'2010-03-04', :p2=3D'2010-03-04', :p3=3D'1239848']
Looking online it seems that the 3rd parameter which is a numberic ID is
being passed in as a string.
A snippet of the model is as follows:
package SOS::App::Model::Sales::Result::Item;
use strict;
use warnings;
use base qw( SOS::App::Model::Sales::Result );
__PACKAGE__->table( "order_lineitem" );
__PACKAGE__->add_columns(
"lineitem_id", { data_type =3D> "NUMBER", default_value =3D> unde=
f,
is_nullable =3D> 0, size =3D> 15 },
"last_mod_date", { data_type =3D> "DATE", default_value =3D>
undef, is_nullable =3D> 1, size =3D> 19 },
"creative_rcpt_date", { data_type =3D> "DATE", default_value =3D>
undef, is_nullable =3D> 1, size =3D> 19 },
...
----------------------------
Michael Blanco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100305/cdd=
f8ef4/attachment.htm
More information about the DBIx-Class
mailing list