cakephp - How to filter out softly deleted records? -
because data integrity have records in database (postgresql) table flag defining particular record (softly) deleted, e.g. table_name.is_deleted = true/false
. filter out these records methods returns data , not include is_deleted=false
condition array
.
is there functionality / setting in cake model ignore such records?
don't that. use history table pattern. copy row history table on delete using trigger.
use similar this: https://wiki.postgresql.org/wiki/audit_trigger_91plus
Comments
Post a Comment