Biblio-Zotero-DB
view release on metacpan or search on metacpan
lib/Biblio/Zotero/DB/Schema/Result/StoredItemAttachment.pm view on Meta::CPAN
]
);
# the above view_definition is the same as:
# ----------------------------------------
# my $deleted = $schema->resultset('DeletedItem')
# ->get_column('itemid')
# ->as_query;
# $schema
# ->resultset('ItemAttachment')
# ->search(
# { -and => [ { itemid => { -not_in => $deleted } },
# { -or => [ { sourceitemid => undef },
# { sourceitemid => { -not_in => $deleted } }] }
# ] }
# )->as_query
# ####
# the clause checking the sourceitemid is for when only the source item is
# marked as deleted, but the attachment is not
1;
__END__
( run in 1.113 second using v1.01-cache-2.11-cpan-0a987023a57 )