notorm icon indicating copy to clipboard operation
notorm copied to clipboard

aggregate on union

Open softwarevamp opened this issue 12 years ago • 1 comments

i have a situation where to find max slug

$max_slug = $db->manufacturers()->select('manufacturers_slug slug')->union($db->categories()->select('categories_description:categories_slug slug'))->max('slug');

seem notorm cannot handle this can you add an api to execute plain query? do you plan to do that?

softwarevamp avatar Mar 04 '14 06:03 softwarevamp

No, I don't plan to add an API to execute plain query. This seems like easily solvable by two queries.

Jakub

On 03/03/2014 10:45 PM, softwarevamp wrote:

i have a situation where to find max slug

|$max_slug = $db->manufacturers()->select('manufacturers_slug slug')->union($db->categories()->select('categories_description:categories_slug slug'))->max('slug'); |

seem notorm cannot handle this can you add an api to execute plain query? do you plan to do that?

— Reply to this email directly or view it on GitHub https://github.com/vrana/notorm/issues/79.

vrana avatar Mar 06 '14 16:03 vrana