- Fix regression on not properly throwing when $obj->relationship
is unresolvable
- Add has_relationship method to row objects
+ - Fix for SQLite to ignore the { for => ... } attribute
0.08120 2010-02-24 08:58:00 (UTC)
- Make sure possibly overwritten deployment_statements methods in
--- /dev/null
+package # Hide from PAUSE
+ DBIx::Class::SQLAHacks::SQLite;
+
+use base qw( DBIx::Class::SQLAHacks );
+use Carp::Clan qw/^DBIx::Class|^SQL::Abstract/;
+
+#
+# SQLite does not understand SELECT ... FOR UPDATE
+# Adjust SQL here instead
+#
+sub select {
+ my $self = shift;
+ local $self->{_dbic_rs_attrs}{for} = undef;
+ return $self->SUPER::select (@_);
+}
+
+1;
use File::Copy;
use File::Spec;
+__PACKAGE__->sql_maker_class('DBIx::Class::SQLAHacks::SQLite');
+
sub backup
{
my ($self, $dir) = @_;
--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
+use DBIC::SqlMakerTest;
+
+my $schema = DBICTest->init_schema;
+
+is_same_sql_bind(
+ $schema->resultset('Artist')->search ({}, {for => 'update'})->as_query,
+ "(SELECT me.artistid, me.name, me.rank, me.charfield FROM artist me)", []);
+
+done_testing;