Mercurial > pub > Impl
diff Lib/IMPL/ORM/Object.pm @ 38:d660fb38b7cc
small fixes
ORM shema to SQL schema transformation
author | Sergey |
---|---|
date | Mon, 23 Nov 2009 17:57:07 +0300 |
parents | d59526f6310e |
children | 32d2350fccf9 |
line wrap: on
line diff
--- a/Lib/IMPL/ORM/Object.pm Mon Nov 23 00:59:06 2009 +0300 +++ b/Lib/IMPL/ORM/Object.pm Mon Nov 23 17:57:07 2009 +0300 @@ -72,7 +72,7 @@ $schema->appendChild( new IMPL::ORM::Schema::Relation::HasMany($ormProp->Name, $type->entityName) ); } elsif (my $type = $dataSchema->isValueType($ormProp->Type,'IMPL::ORM::Object')) { # поле - $schema->appendChild( new IMPL::ORM::Schema::Field($ormProp->Name,$type) ); + $schema->appendChild( new IMPL::ORM::Schema::Field($ormProp->Name,$type->name) ); } elsif (my $entity = $dataSchema->resolveType($ormProp->Type)) { # отношение ссылка $schema->appendChild( new IMPL::ORM::Schema::Relation::HasOne($ormProp->Name,$entity->entityName));