Commit 77daa29c authored by Jonathan.Wage's avatar Jonathan.Wage

Changed default to yml.

parent 8c8d8187
......@@ -82,7 +82,7 @@ class Doctrine_Resource_Client extends Doctrine_Resource
$import = new Doctrine_Import_Schema();
$schema = $import->buildSchema($path, $this->getConfig()->get('format'));
if (file_exists($classesPath)) {
if (!file_exists($classesPath)) {
$build = "<?php\n";
foreach ($schema['schema'] as $className => $details) {
$build .= "class " . $className . " extends Doctrine_Resource_Record { protected \$_model = '".$className."'; public function __construct(\$loadRelations = true) { parent::__construct(\$this->_model, \$loadRelations); } }\n";
......
......@@ -48,7 +48,6 @@ class Doctrine_Resource_Table
if (isset($schema['relations'][$model]) && $schema['relations'][$model]) {
$this->_schema['relations'] = $schema['relations'][$model];
$this->_schema['schema']['relations'] = $this->_schema['relations'];
}
}
......
......@@ -16,15 +16,17 @@ if ($action == 'server') {
} else {
$url = 'http://localhost/~jwage/doctrine_trunk/playground/index.php?action=server';
$config = array();
$config = array('format' => 'yml');
// Instantiate a new client
$client = Doctrine_Resource_Client::getInstance($url, $config);
/*
$query = new Doctrine_Resource_Query();
$users = $query->from('User u, u.Group g')->execute();
print_r($users->toArray(true));
*/
/*
$group = new Group();
......
This diff is collapsed.
......@@ -603,6 +603,12 @@ User:
local: user_id
foreign: address_id
type: many
Addresses:
refClass: EntityAddress
class: Address
local: user_id
foreign: address_id
type: many
Album:
local: id
foreign: user_id
......
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