--- blib/lib/RDF/Trine/Store/DBI.pm	2010-08-30 17:48:00.000000000 +0100
+++ /usr/lib/perl5/site_perl/5.10.1/RDF/Trine/Store/DBI.pm	2010-09-13 19:03:43.000000000 +0100
@@ -1011,7 +1011,7 @@
 sub _sql_for_triple { &_sql_for_statement; }
 sub _sql_for_quad { &_sql_for_statement; }
 {
-	my %restrictions	= (
+	my %default_restrictions	= (
 		subject		=> ['literal'],
 		predicate	=> [qw(literal blank)],
 		object		=> [],
@@ -1024,6 +1024,10 @@
 	my $context	= shift;
 	my %args	= @_;
 	
+	my %restrictions = defined $self->{restrictions}
+		? %{ $self->{restrictions} }
+		: %default_restrictions;
+
 	my $quad	= $triple->isa('RDF::Trine::Statement::Quad');
 	no warnings 'uninitialized';
 	if ($args{semantics} eq 'triple') {
