diff _test/Test/ORM/Schema.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/_test/Test/ORM/Schema.pm	Mon Nov 23 00:59:06 2009 +0300
+++ b/_test/Test/ORM/Schema.pm	Mon Nov 23 17:57:07 2009 +0300
@@ -7,6 +7,8 @@
 
 use IMPL::Test qw(test failed);
 
+require IMPL::ORM::Schema::TransformToSQL;
+
 test ExtractClassSchema => sub {
     my ($this) = @_;
     
@@ -24,6 +26,12 @@
     return 1;
 };
 
+test TransformDataSchema => sub {
+    my $sqlSchema = IMPL::ORM::Schema::TransformToSQL->Std->Transform(Test::ORM::Schema::Data->instance)
+        or failed("Failed to transform a schema");
+    $sqlSchema->Dispose;
+};
+
 
 package Test::ORM::Schema::Data::User;
 use base qw(IMPL::ORM::Object);
@@ -59,11 +67,11 @@
 use base qw(IMPL::ORM::Schema);
 
 __PACKAGE__->ValueTypes (
-    'String' => 'IMPL::ORM::Value::String',
-    'DateTime' => 'IMPL::ORM::Value::DateTime',
-    'Integer' => 'IMPL::ORM::Value::Inetger',
-    'Float' => 'IMPL::ORM::Value::Float',
-    'Decimal' => 'IMPL::ORM::Value::Decimal'
+    String => 'IMPL::ORM::Value::String',
+    DateTime => 'IMPL::ORM::Value::DateTime',
+    Integer => 'IMPL::ORM::Value::Inetger',
+    Float => 'IMPL::ORM::Value::Float',
+    Decimal => 'IMPL::ORM::Value::Decimal'
 );
 
 __PACKAGE__->usePrefix(__PACKAGE__);