Re: [Dbix-class] Joins using sub-selects

2018-10-09 Thread Andrew Beverley
On Mon, 8 Oct 2018 15:26:41 + David Cantrell wrote: > I'm having trouble figuring out how to express one of my joins in > DBIx::Class. > > The two tables involved and some relevant sample data are: > > > select * from serviceplan_price; >

Re: [Dbix-class] Joins using sub-selects

2018-10-09 Thread David Cantrell
On Tue, Oct 09, 2018 at 08:48:33AM +0200, QE :: Felix Ostmann wrote: > i did not see a problem with you current approach. It is simple you dislike > literal sql? It's partly an aesthetic objection, but also I didn't like having to repeat the filters on type and id. But if there's no better way

Re: [Dbix-class] Joins using sub-selects

2018-10-09 Thread QE :: Felix Ostmann
Hi David, i did not see a problem with you current approach. It is simple you dislike literal sql? You could write the subselect as a dbic statement and call as_query() and use it, see https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod#Correlated-subqueries my