Commit d2f41b75 authored by Jonathan.Wage's avatar Jonathan.Wage

Initial entry.

parent 4f996de8
<?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
<?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
<?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
<?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
---
Contact:
columns:
name:
type: string
length: 255
\ No newline at end of file
---
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment