From d2f41b751be5f3da13f8690ed9d8a3aa49241497 Mon Sep 17 00:00:00 2001
From: "Jonathan.Wage" <Jonathan.Wage@625475ce-881a-0410-a577-b389adb331d8>
Date: Mon, 15 Oct 2007 19:34:48 +0000
Subject: [PATCH] Initial entry.

---
 sandbox/models/Contact.class.php              |  19 +++++++++++++++
 sandbox/models/User.class.php                 |  10 ++++++++
 .../models/generated/BaseContact.class.php    |  21 +++++++++++++++++
 sandbox/models/generated/BaseUser.class.php   |  22 ++++++++++++++++++
 sandbox/sandbox.db                            | Bin 0 -> 4096 bytes
 sandbox/schema/contact.yml                    |   6 +++++
 sandbox/schema/user.yml                       |  13 +++++++++++
 7 files changed, 91 insertions(+)
 create mode 100644 sandbox/models/Contact.class.php
 create mode 100644 sandbox/models/User.class.php
 create mode 100644 sandbox/models/generated/BaseContact.class.php
 create mode 100644 sandbox/models/generated/BaseUser.class.php
 create mode 100755 sandbox/sandbox.db
 create mode 100644 sandbox/schema/contact.yml
 create mode 100644 sandbox/schema/user.yml

diff --git a/sandbox/models/Contact.class.php b/sandbox/models/Contact.class.php
new file mode 100644
index 000000000..b646b7f21
--- /dev/null
+++ b/sandbox/models/Contact.class.php
@@ -0,0 +1,19 @@
+<?php
+require_once('generated/BaseContact.class.php');
+/**
+ * This class has been auto-generated by the Doctrine ORM Framework
+ */
+class Contact extends BaseContact
+{
+
+	public function setTableDefinition()
+	{
+				parent::setTableDefinition();
+	}
+
+	public function setUp()
+	{
+				parent::setUp();
+	}
+
+}
\ No newline at end of file
diff --git a/sandbox/models/User.class.php b/sandbox/models/User.class.php
new file mode 100644
index 000000000..7ee5937fe
--- /dev/null
+++ b/sandbox/models/User.class.php
@@ -0,0 +1,10 @@
+<?php
+require_once('generated/BaseUser.class.php');
+/**
+ * This class has been auto-generated by the Doctrine ORM Framework
+ */
+class User extends BaseUser
+{
+
+
+}
\ No newline at end of file
diff --git a/sandbox/models/generated/BaseContact.class.php b/sandbox/models/generated/BaseContact.class.php
new file mode 100644
index 000000000..c2c418e67
--- /dev/null
+++ b/sandbox/models/generated/BaseContact.class.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * This class has been auto-generated by the Doctrine ORM Framework
+ */
+abstract class BaseContact extends Doctrine_Record
+{
+
+	public function setTableDefinition()
+	{
+        $this->setTableName('contact');
+        $this->hasColumn('name', 'string', 255);
+	}
+
+	public function setUp()
+	{
+        $this->hasMany('User', array('local' => 'id',
+                                     'foreign' => 'contact_id'));
+	}
+
+}
\ No newline at end of file
diff --git a/sandbox/models/generated/BaseUser.class.php b/sandbox/models/generated/BaseUser.class.php
new file mode 100644
index 000000000..eba00611d
--- /dev/null
+++ b/sandbox/models/generated/BaseUser.class.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * This class has been auto-generated by the Doctrine ORM Framework
+ */
+abstract class BaseUser extends Doctrine_Record
+{
+
+	public function setTableDefinition()
+	{
+        $this->setTableName('user');
+        $this->hasColumn('username', 'string', 255);
+        $this->hasColumn('contact_id', 'integer', null);
+	}
+
+	public function setUp()
+	{
+        $this->hasOne('Contact', array('local' => 'contact_id',
+                                       'foreign' => 'id'));
+	}
+
+}
\ No newline at end of file
diff --git a/sandbox/sandbox.db b/sandbox/sandbox.db
new file mode 100755
index 0000000000000000000000000000000000000000..5f4bd6848e27a8149a1019f7ec841d5287b1e48b
GIT binary patch
literal 4096
zcmeH`&uRiO5XO^@*i(<z>)>gZ^&l<Y8ztDK?$*Y%u&1)EDGL5UH$H$b*k@`+dsyuY
z2s;Bql8;G-{E~0_I$k&n-<#d4aPYtyjC1w~z!(dBRs+|(B2?!U`Tz9ROG4Z+@gwGb
zpdbQQPGBOM?KtMSD?XRD+%COEK1#dY+x6GwvN6<38U;oU#tJTK!*#K;UB5G$1vl+h
ziyz|Sk^9o_FvZzsR3Kc;AjymxDGd{yq*CYbta6ZV<|WB|eX26k1+2xx;a%$ClhomT
zzaK?C-o!5I*u>e=VFqVSIw*A@JdF{0)0>`x2oQl95+MKA@X_hYMBtAA`JcW55vVVL
EU%>fK%m4rY

literal 0
HcmV?d00001

diff --git a/sandbox/schema/contact.yml b/sandbox/schema/contact.yml
new file mode 100644
index 000000000..d1fa3ab41
--- /dev/null
+++ b/sandbox/schema/contact.yml
@@ -0,0 +1,6 @@
+---
+Contact:
+  columns:
+    name:
+      type: string
+      length: 255
\ No newline at end of file
diff --git a/sandbox/schema/user.yml b/sandbox/schema/user.yml
new file mode 100644
index 000000000..10cfa2b67
--- /dev/null
+++ b/sandbox/schema/user.yml
@@ -0,0 +1,13 @@
+---
+User:
+  columns:
+    username:
+      type: string
+      length: 255
+    contact_id:
+      type: integer
+      size: 11
+  relations:
+    Contact:
+      local: contact_id
+      foreign: id
\ No newline at end of file