diff Lib/IMPL/ORM/Schema.pm @ 31:d59526f6310e

Small fixes to Test framework (correct handlinf of the compilation errors in the test units) Imported and refactored SQL DB schema from the old project
author Sergey
date Mon, 09 Nov 2009 01:39:16 +0300
parents dd4d72600c69
children d660fb38b7cc 4ff27cd051e3
line wrap: on
line diff
--- a/Lib/IMPL/ORM/Schema.pm	Tue Nov 03 16:31:47 2009 +0300
+++ b/Lib/IMPL/ORM/Schema.pm	Mon Nov 09 01:39:16 2009 +0300
@@ -14,7 +14,7 @@
     public property mapValueTypes => prop_get | owner_set;
     public property mapReferenceTypes => prop_get | owner_set;
     public property mapPending => prop_get | owner_set;
-    public property prefix => prop_all; 
+    public property prefix => prop_get | owner_set; 
 }
 
 sub CTOR {
@@ -91,9 +91,20 @@
 sub usePrefix {
     my ($this,$prefix) = @_;
     
+    $prefix .= '::' if $prefix and $prefix !~ /::$/;
+    
     (ref $this ? $this : $this->instance)->prefix($prefix);
 }
 
+sub CompleteSchema {
+    my ($this) = @_;
+    
+    $this = ref $this ? $this : $this->instance;
+    
+    $this->mapReferenceTypes->{$_} = $_->ormGetSchema($this,delete $this->mapPending->{$_})
+        foreach (keys %{$this->mapPending});
+}
+
 1;
 
 __END__