symfony - Add condition on all query maked on object -
i add "hidden" query on query. explain:
exemple table car:
## id # color # constructor # model # destroyed 1 blue bmw model1 false 2 green citroen modelab false 3 red nissan modelz false 4 blue bmw modelw true 5 black peugeot modely false i when make requet select * car colour = 'blue' real query be: select * car colour = 'blue' , destroyed = false
on query destroyed cars exclude. execpt if write where destroyed = true in query.
i've see in symfony 1.4.x last year don't know how in symfony 2.x
i think soft delete filter great example you're trying achieve - https://github.com/l3pp4rd/doctrineextensions/blob/master/doc/softdeleteable.md
Comments
Post a Comment