Simone, As soon as one uses a function in the SELECT clause, the result is no longer an object made persistent in the database, it's a new class (a subclass (not yet defined) of DoctrineObject).
Because you are using SUM, there is no unique key for the result (except in the situation where only one row matches the WHERE clause), so any methods of Slave which update the database are not going to work (as you have no GROUP BY, the result of your query is a single row and therefore a subset of Slave and not SlaveTable). You could instantiate a new Slave and set its properties to the results of the query. This would allow you to use the methods you have already written (if I understand the reason for your question), as long as they don't reference fields/properties not included in your query. Please ask if you want more details. Regards, Graham On May 24, 6:27 pm, Simone Fumagalli <simone.fumaga...@gmail.com> wrote: > On May 24, 6:20 pm, Philipp Mohrenweiser <phi...@googlemail.com> > wrote: > > > Not a collection ? so you should probably use a limit 1 statement ... > > but if you want to get back multiple entrys the collection should be > > the right thing !? > > As you can see I've SUM in my select so I want an object with the sum > of the found rows. > > -- > Simone > > -- > 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 > athttp://groups.google.com/group/symfony-users?hl=en -- 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