[Dbix-class] Restricting Result Sets
Ovid
publiustemp-dbic at yahoo.com
Fri Nov 7 07:47:04 GMT 2008
--- On Thu, 6/11/08, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
> How about adding a column that would say if a given pid is
> deleted to
> the Identifier table? Then
> my $rs =
> $schema->resultset('Identifier')->search({
> type => 'pid',
> value => $pid,
> is_deleted => 0,
> });
> print $rs->count; # prints 0
>
> No joins - just a bit denormalized.
This was considered and shot down. It's far too dangerous. There are several different ways data can be added/deleted to the system (none manually, thank goodness), and these ways could be expanded in the future. Just missing this once could have wide-ranging consequences and we can't risk this. (We could make it happen with triggers, but we're very scared of using triggers with MySQL due to how buggy we've found them).
So there's no way to build one resultset based on another resultset (assuming that the filtering criteria could be more than db related)? :(
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
More information about the DBIx-Class
mailing list