diff options
Diffstat (limited to 'perl/lib')
| -rw-r--r-- | perl/lib/Wallet/Schema.pm | 2 | ||||
| -rw-r--r-- | perl/lib/Wallet/Schema/Result/Duo.pm | 14 | 
2 files changed, 13 insertions, 3 deletions
| diff --git a/perl/lib/Wallet/Schema.pm b/perl/lib/Wallet/Schema.pm index cb4c93e..5b850c0 100644 --- a/perl/lib/Wallet/Schema.pm +++ b/perl/lib/Wallet/Schema.pm @@ -18,7 +18,7 @@ use base 'DBIx::Class::Schema';  # This version should be increased on any code change to this module.  Always  # use two digits for the minor version with a leading zero if necessary so  # that it will sort properly. -our $VERSION = '0.09'; +our $VERSION = '0.10';  __PACKAGE__->load_namespaces;  __PACKAGE__->load_components (qw/Schema::Versioned/); diff --git a/perl/lib/Wallet/Schema/Result/Duo.pm b/perl/lib/Wallet/Schema/Result/Duo.pm index 80a71dc..6ad61e9 100644 --- a/perl/lib/Wallet/Schema/Result/Duo.pm +++ b/perl/lib/Wallet/Schema/Result/Duo.pm @@ -45,9 +45,19 @@ __PACKAGE__->table("duo");  __PACKAGE__->add_columns(    "du_name",    { data_type => "varchar", is_nullable => 0, size => 255 }, +  "du_type", +  { data_type => "varchar", is_nullable => 0, size => 16 },    "du_key",    { data_type => "varchar", is_nullable => 0, size => 255 },  ); -__PACKAGE__->set_primary_key("du_name"); - +__PACKAGE__->set_primary_key("du_name", "du_type"); + +__PACKAGE__->belongs_to( +                        'object', +                        'Wallet::Schema::Result::Object', +                        { +                            'foreign.ob_type' => 'self.du_type', +                            'foreign.ob_name' => 'self.du_name', +                        }, +                       );  1; | 
