Mercurial > pub > Impl
comparison lib/IMPL/ORM/Schema/Relation/HasMany.pm @ 407:c6e90e02dd17 ref20150831
renamed Lib->lib
| author | cin |
|---|---|
| date | Fri, 04 Sep 2015 19:40:23 +0300 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 406:f23fcb19d3c1 | 407:c6e90e02dd17 |
|---|---|
| 1 package IMPL::ORM::Schema::Relation::HasMany; | |
| 2 use strict; | |
| 3 use warnings; | |
| 4 | |
| 5 use parent qw(IMPL::ORM::Schema::Relation); | |
| 6 use IMPL::Class::Property; | |
| 7 | |
| 8 BEGIN { | |
| 9 public property target => prop_get | owner_set; | |
| 10 public property name => prop_get | owner_set; | |
| 11 } | |
| 12 | |
| 13 our %CTOR = ( | |
| 14 'IMPL::ORM::Schema::Relation' => sub { 'HasMany' } | |
| 15 ); | |
| 16 | |
| 17 sub CTOR { | |
| 18 my ($this,$name,$target) = @_; | |
| 19 $this->name($name) or die new IMPL::InvalidArgumentException('A name is required for this relation'); | |
| 20 $this->target($target) or die new IMPL::InvalidArgumentException('A target is required for this relation',$name); | |
| 21 } | |
| 22 | |
| 23 sub canHaveChildren { | |
| 24 0; | |
| 25 } | |
| 26 | |
| 27 1; |
