I assume you are using Propel and I'm not aware of a solution using it, but Doctrine can hydrate objects from a query like that have a look. http://www.phpdoctrine.org/documentation/manual/0_10?one-page#dql-doctrine-query-language:select-queries
Thanks, Michael On Feb 21, 3:16 am, CO2 <[EMAIL PROTECTED]> wrote: > I have trouble finding a good solution to the following tasks: > > Schema 1: > item: > id: > customer: > item_id: > > I need to output a list of customers with assigned items: > > customer1 > itemA > itemB > customer2 > itemC > > Of course I can retrieve customers and items in two arrays and do some > dirty stuff in the action or template using php but I know there are > better solutions. > > ------------------------------------- > Schema2: > > user: > id: > group: > id: > user_in_group: > user_id: > group_id: > > Users can be memebers of multiple groups. I need to output a list of > groups with assigned users: > group1 > userA > userB > group2 > userB > userC > > Again I'm looking for a better solution than getting two array and > going through them in several loops ;-) > Sorry for posting very basic questions more related to db queries than > symfony but I will have to find a solution to use within symfony right > away. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---