On 11/16/2015 06:20 AM, Darin McBride wrote:
On Sunday November 15 2015 7:09:05 PM Darin McBride wrote:
So, the column is:

__PACKAGE__->add_columns(
     name                    => { data_type => 'varchar', size => 30,
is_nullable => 0 },

So, explicitly not nullable.

I've added this code as the next executable line after all the columns:

__PACKAGE__->add_unique_constraint(name => ['name']);

And now my search (which has grown since last time - I'm now prefetching
sitterauths, too, since I'm going to need a field from there for each empire
returned) looks like this:

         $planet_rs =
             Lacuna->db->resultset('Map::Body')->
             search(
                    {
                        'sitterauths.sitter_id' => $real_empire->id,
                        'me.class' => { '!=' =>
'Lacuna::DB::Result::Map::Body::Planet::Station' },
                    },
                    {
                        join => { empire => 'sitterauths' },
                        prefetch => { 'empire', 'sitterauths' },
                        order_by => ['me.name'],
                    });


Please use the resultset exactly as defined above, execute the following and get me its result:


use Devel::Dwarn;
$Data::Dumper::Maxdepth = 3;
Dwarn [
 $planet_rs->result_source
            ->schema
             ->storage
              ->_extract_colinfo_of_stable_main_source_order_by_portion(
                $planet_rs->_resolved_attrs
              )
]


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to