Could it be that there's code that is executed to make sure the ids are valid ids?
On Mon, Feb 8, 2010 at 1:33 PM, Eno <symb...@gmail.com> wrote: > On Sun, 7 Feb 2010, HiDDeN wrote: > >> I have this route: >> >> product: >> url: /:slug-:id.html >> param: { module: info, action: index } >> options: { model: Product, type: object, segment_separators: ['/', >> '.', '-'] } >> >> And I'm using this link_to inside a foreach (it's a list of products >> urls): >> >> <?php echo link_to($product['title'], "@product?slug={$product['slug']} >> &id={$product['id']}") ?> >> >> My list contains 50 products, and so there are 50 calls to the >> database to retrieve each product. I don't know why... because I just >> want to generate urls. > > If you run the app in dev mode you should be able to click on the debig > toolbar and see the exact queries. Can you show the queries? Does your > product schema include the slug field? > > > > -- > > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@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. > > -- Blue Horn Ltd - System Development http://bluehorn.co.nz -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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.