Hi, Say I have a Person entity, and each person can have multiple Pets assigned to him. The assignments are managed through a third entity called PetAssignment (simply has Person and Pet properties). How can I select all Persons (their names, addresses, etc.) as well as a comma-separated list of their Pets' names? I want this done in a way that DO only executes one query to the DB! For example:
I've done this using both a JOIN ... INTO as well as by doing a JOIN + GROUP BY. I either get multiple queries, or I get an exception: The current transaction is different from the transaction bound to this instance. I'm using DO 4.5 |