Mercurial > pub > Impl
diff Lib/IMPL/ORM/Schema/Field.pm @ 38:d660fb38b7cc
small fixes
ORM shema to SQL schema transformation
author | Sergey |
---|---|
date | Mon, 23 Nov 2009 17:57:07 +0300 |
parents | 6d33f75c6e1f |
children | 16ada169ca75 |
line wrap: on
line diff
--- a/Lib/IMPL/ORM/Schema/Field.pm Mon Nov 23 00:59:06 2009 +0300 +++ b/Lib/IMPL/ORM/Schema/Field.pm Mon Nov 23 17:57:07 2009 +0300 @@ -8,6 +8,7 @@ BEGIN { public property fieldName => prop_get | owner_set; public property fieldType => prop_get | owner_set; + public property fieldNullbale => prop_get | owner_set; } our %CTOR = ( @@ -15,10 +16,11 @@ ); sub CTOR { - my ($this,$name,$type) = @_; + my ($this,$name,$type,$nullable) = @_; $this->fieldName($name) or die new IMPL::InvalidArgumentException('A name is required for the field'); $this->fieldType($type) or die new IMPL::InvalidArgumentException('A type is required for the field'); + $this->fieldNullbale(1) if $nullable; } sub canHaveChildren {