Skip to content

Instantly share code, notes, and snippets.

@SysPete
Last active August 29, 2015 14:11
Show Gist options
  • Save SysPete/62e9dd7263770c7cc0a9 to your computer and use it in GitHub Desktop.
Save SysPete/62e9dd7263770c7cc0a9 to your computer and use it in GitHub Desktop.
fixup Address::state relationship which should be left join in Schema.pm
use utf8;
package Interchange6::Schema;
use strict;
use warnings;
use base 'DBIx::Class::Schema';
use Interchange6::Schema::Result::Address;
Interchange6::Schema::Result::Address->belongs_to(
state => "Interchange6::Schema::Result::State",
{ states_id => "states_id" },
{ join_type => 'left', is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" };
__PACKAGE__->load_namespaces;
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment