Thanks for answering! I have some doubts about how symfony and doctrine works, I think that jobeet would be so much easier if the doctrine documentation was better. Other possibility is that I greatly complicating the doctrine understanding,what do you mean by creating that method? As far as I know, in the JobeetJobTable.class.php for example, the method addActiveJobsQuery() use the Doctrine_Query instead of the Doctrine_Core. I will thankfull if someone can explain me like in a practical example why you should you use getTable. Have any relationship with foreignAlias? Really, don't know, I'm a little lost. Sorry for my english, and thank you for reading me :)
On 1 abr, 00:13, Roger Webb <webb.ro...@gmail.com> wrote: > As I best understand it, the "table" object is supposed to act as a > repository. You would, ideally, add methods to the table class to > retrieve instances of 'tableClass'. > > It may be better illustrated with an example: > > You have a class(model) User. In your UserTable class you might make > a method called "findActiveUserByUsername()" to find all active > users. > > If you were to use Doctrine_Query::create()->from('User u')->where('u.active > = 1'); you would get the same result, but your query > > would not be re-usable. > > Roger > > On Mar 31, 1:54 pm, FHoerth <fed...@gmail.com> wrote: > > > > > > > > > Hi! > > Can someone explain me what is the difference between: > > > $this->var = Doctrine_Core::getTable('tableClass')- > > > >createQuery('alias')->where('alias.column > ?', date); > > > and this? > > > $this->var = Doctrine_Query::create()->from('tableClass alias')- > > > >where('alias.column > ?', date); > > > Why not using a single method? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en