I would maybe create a own criterium class, which hinherits Criteria.
This class adds a criterion with this publishing flag in the  
constructor.

------
myCriteria extends Criteria(){

public function __construct(){
$this->add('is_published',1); // table attribute hard coded
}
}
------

Here is the precondition, that every model/table has a attribute,  
which is called 'is_published'.

Now you always have  to create instances of myCriteria and should  
never user the Criteria class directly.

- Frank

Am 29.04.2007 um 23:14 schrieb Ant Cunningham:

>
> What would be the best way to add a default join and condition to ALL
> queries in an application?
>
> Ive got a table for workflow and for the frontend app I always have to
> select only the records that are published regradless of their table.
>
> How would you do this?
>
> thanks!
>
>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to