Ima::DBI "Not an array reference" problem
From: Peter Eichman (peichman_at_wam.umd.edu)
Date: 07/06/04
- Next message: \: "HELP me in installing perl DBI for solaris 9"
- Previous message: Ron Reidy: "RE: Best Way to Auto Increment with Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 6 Jul 2004 11:00:00 -0700
I'm working on a Class::DBI based application using a Postgres
database, and it is failing with this error:
CSP::Calendar::Appointment can't
SELECT id, semester, person, class_number, room, start, appt_end,
series, canceled, comments, entered_by, entered_at
FROM appointment
WHERE date_trunc('day', ?) BETWEEN date_trunc('day', start) AND
date_trunc('day', appt_end)
: Not an array reference (DateTime=HASH(0x5a91354)) at
C:/Perl/site/lib/Ima/DBI.pm line 715, <DATA> line 164.
at D:/Programs/CSPCalendar/GUI/CalendarView.pm line 618
Here are what I think are the relevant code excerpts:
CalendarView.pm - line 618 - the initial source of the call that is
causing the error:
my @all_appts = CSP::Calendar::Appointment->search_on_date($date);
in CSP::Calendar::Appointment, where I set up the search_on_date
method:
__PACKAGE__->set_sql(on_date => qq[
SELECT __ESSENTIAL__
FROM __TABLE__
WHERE date_trunc('day', ?) BETWEEN date_trunc('day', start) AND
date_trunc('day', appt_end)
]);
start and appt_end are defined as:
__PACKAGE__->has_a(
start => 'DateTime',
inflate => sub { DateTime::Format::W3CDTF->parse_datetime(shift)
},
deflate => 'datetime',
);
__PACKAGE__->has_a(
appt_end => 'DateTime',
inflate => sub { DateTime::Format::W3CDTF->parse_datetime(shift)
},
deflate => 'datetime',
);
When I switch to a SQLite databse, this problem goes away. Can anyone
shed any light on this problem? (If there is a different, more
appropriate list to send this problem, let me know).
tia,
-Peter Eichman
- Next message: \: "HELP me in installing perl DBI for solaris 9"
- Previous message: Ron Reidy: "RE: Best Way to Auto Increment with Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|