Re: [Dbix-class] view and is_nullable

2017-11-07 Thread Thomas Sibley
What I do in this situation is amend the generated result definition with another call to add_columns, like so: __PACKAGE__->add_columns(“+column_name" => { is_nullable => 0 }); That overrides the generated value, and dbicdump preserves your custom amendments to the class provided they’re

[Dbix-class] How to deal with right joins while under test/sqlite

2017-11-07 Thread Trevor Leffler
Up until recently I've been exclusively using a mysql database. I've started writing tests using Test::DBIx::Class, which loads my schema into an in-memory sqlite database. I got it working after making a few minor code changes to my Result/ResultSet classes. For example, I had to replace the

[Dbix-class] view and is_nullable

2017-11-07 Thread Alex Povolotsky
Hello I'm using a view to make code more readable; dbicdump sets is_nullable to 1 for all fields. Than I'm copying relation from one of the tables used in view, and "might_have/has_one" must not be on columns with is_nullable set to true (Billing::Schema::Result::BillDebt/at_id). This might

Re: [Dbix-class] How to deal with right joins while under test/sqlite

2017-11-07 Thread Trevor Leffler
Well... nevermind this. A little searching reminding me that I can replace right join queries with left join queries (and vice versa). I've replaced my handful of right join queries and have things working. Cheers, --Trevor From: dbix-class-boun...@lists.scsys.co.uk

Re: [Dbix-class] How to deal with right joins while under test/sqlite

2017-11-07 Thread James Gilbert
Indeed. I've never used a right or full join. Only ever an inner or left. James > On 7 Nov 2017, at 19:28, Trevor Leffler wrote: > > Well… nevermind this. A little searching reminding me that I can replace > right join queries with left join queries (and vice versa).