Subject: | SQLite SQL parsing issue |
Date: | Wed, 16 Aug 2006 14:00:14 -0300 |
To: | bug-DBIx-Class-Schema-Loader [...] rt.cpan.org |
From: | "Eden Cardim" <edencardim [...] gmail.com> |
Activating debug gives me this:
<debug>
Askgene::Data::Entry->has_many(
"annotations",
"Annotation",
{ "foreign.entry_id)" => "self.id" },
);
</debug>
which causes the following error when I attempt to use the relationship:
<error>
DBD::SQLite::db prepare_cached failed: near ")": syntax error(1) at
dbdimp.c line 269 at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line
839.
DBIx::Class::Relationship::Accessor::__ANON__(): no sth generated via
sql (near ")": syntax error(1) at dbdimp.c line 269): SELECT me.id,
me.entry_id, me.seqread_id, me.label, me.description, me.begin, me.end
FROM annotation me WHERE ( me.entry_id) = ? ) at
/opt/eden/workspace/Askgene/lib/Askgene/Segment/Xterm.pm line 14
</error>
<loader_options>
__PACKAGE__->loader_options(
relationships => 1,
debug => 1
);
</loader_options>
<schema>
CREATE TABLE plate (
id INTEGER PRIMARY KEY NOT NULL,
label VARCHAR(50) NOT NULL UNIQUE
);
CREATE TABLE entry (
id INTEGER PRIMARY KEY NOT NULL,
plate_id INTEGER UNSIGNED NOT NULL,
created DATE NOT NULL,
FOREIGN KEY( plate_id ) REFERENCES plate(id)
);
CREATE TABLE seqRead (
id INTEGER PRIMARY KEY NOT NULL,
plate_id INTEGER UNSIGNED NOT NULL,
label VARCHAR(255) NOT NULL,
size SMALLINT UNSIGNED NOT NULL,
sequence TEXT NOT NULL,
quality TEXT NOT NULL,
FOREIGN KEY( plate_id ) REFERENCES plate(id)
);
CREATE TABLE annotation (
id INTEGER PRIMARY KEY NOT NULL,
entry_id INTEGER UNSIGNED NOT NULL,
seqRead_id INTEGER UNSIGNED NOT NULL,
label VARCHAR(255) NOT NULL,
description TEXT NULL,
begin SMALLINT UNSIGNED NULL,
end SMALLINT UNSIGNED NULL,
FOREIGN KEY( seqRead_id ) REFERENCES seqRead(id),
FOREIGN KEY( entry_id ) REFERENCES entry(id)
);
</schema>
<versions>
DBD::SQLite 1.12
DBIx::Class::Schema::Loader 0.03007
perl 5.8.8
Linux 2.6.16-2-686-smp #1 SMP Sat Jul 15 22:33:00 UTC 2006 i686 GNU/Linux
</versions>
--
Eden Cardim