[Jifty-commit] r2859 - in Jifty-DBI/trunk: lib/Jifty/DBI
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Feb 27 22:07:09 EST 2007
Author: trs
Date: Tue Feb 27 22:07:09 2007
New Revision: 2859
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
Log:
r19823 at zot: tom | 2007-02-27 22:07:00 -0500
Die on incorrect column type when using the Storable filter
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm Tue Feb 27 22:07:09 2007
@@ -236,6 +236,15 @@
# through add_column
$column->record_class( $package ) if not $column->record_class;
+ # Check for the correct column type when the Storable filter is in use
+ if ( grep { $_ eq 'Jifty::DBI::Filter::Storable' }
+ ($column->input_filters, $column->output_filters)
+ and $column->type !~ /^(blob|bytea)$/i)
+ {
+ die "Column '$column_name' in @{[$column->record_class]} ".
+ "uses the Storable filter but is not of type 'blob'.\n";
+ }
+
no strict 'refs'; # We're going to be defining subs
if ( not $self->can($column_name) ) {
More information about the Jifty-commit
mailing list