--- On Thu, 6/11/08, Zbigniew Lukasiak <[EMAIL PROTECTED]> 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

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to