Hi,
I received the error below running this update:
$lineitem->update({
'last_mod_date' => $now,
'creative_rcpt_date' => $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 = :p1, last_mod_date = :p2
WHERE ( lineitem_id = :p3 )')
[for Statement "UPDATE order_lineitem SET creative_rcpt_date = ?,
last_mod_date = ? WHERE ( lineitem_id = ? )"
with ParamValues: :p1='2010-03-04', :p2='2010-03-04', :p3='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 => "NUMBER", default_value => undef,
is_nullable => 0, size => 15 },
"last_mod_date", { data_type => "DATE", default_value =>
undef, is_nullable => 1, size => 19 },
"creative_rcpt_date", { data_type => "DATE", default_value =>
undef, is_nullable => 1, size => 19 },
...
----------------------------
Michael Blanco
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]