[Dbix-class] "soft deletion"
David Ihnen
davidi at norchemlab.com
Tue Feb 17 21:40:08 GMT 2009
> I wrote a blog post on the specifics of my method.
> http://blog.afoolishmanifesto.com/archives/274. The only things that
> are missing are a) configurability and b) a way to find deleted rows.
> The first is just a matter of me reading the source code of more
> Components, the second seems harder as I can't seem to pull it off
> with the information that people on IRC are giving me. I'll email you
> guys about the solution to that when I get it.
what if instead of
$_[0]->{deletion_date} = \"IS NULL";
You did
$_[0]->{deletion_date} ||= \"IS NULL";
thus not overriding merely specifying, so when you DO want to also see
deleted items,
->search({ deletion_date => \"deletion_date" });
David
More information about the DBIx-Class
mailing list