title: Where should I place my functions that wrap Doctrine queries?
body: <p>I'm learning Symfony + Doctrine 1.2 by writing a web app.  As the app grows in size, I would like to know where I should place my functions that wrap commonly used queries.  Is it good practice to create a custom library class and place all the functions there?  Currently, I have been placing the functions inside the Table class that Doctrine generates.  </p>
  
  <p>For example: </p>
  
  <ul>
  <li>getAllMessagesByUserId($userId) is a function in the MessageTable class.  </li>
  <li>getOnlineUsers() is a function in the UserTable class.</li>
  </ul>
  
  <p>Personally, I would prefer to have all the queries in one place, but I'm concerned that I would be breaking a "best-practice" rule.</p>
  
  <p>What are your thoughts?</p>