[Koha-devel] Advise on DBIx
Tomas Cohen Arazi
tomascohen at gmail.com
Fri Jul 4 20:16:15 CEST 2014
Hi, I'm trying to write some code using our Koha::Schema::Result::* classes.
The sample i picked was the most unfortunate: I want to pull data from
Deletedbiblio and Deletedbibliotems which don't have a relation defined.
The relevant bits of the code look like:
my $resultset = $schema->resultset( 'Deletedbiblio' )->search(
{
Deletedbiblio.biblionumber => $biblionumber
},
{
join => [ qw/ Deletedbiblioitems Itemtypes / ]
}
);
it dies because "No such relationship Deletedbiblioitem on Deletedbiblio".
How shuold we cope with that situation? (I understand introducing a
relationship would mean a lot of trouble as the tables are intended for
deleted / not hard-linked data).
Any ideas? Plain SQL?
Regards
To+
P.S. Happy independence day for those that apply :-D
--
Tomás Cohen Arazi
Prosecretaría de Informática
Universidad Nacional de Córdoba
✆ +54 351 5353750 ext 13168
GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140704/d08c5658/attachment.html>
More information about the Koha-devel
mailing list