Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
77daa29c
Commit
77daa29c
authored
Sep 25, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed default to yml.
parent
8c8d8187
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
4 deletions
+11
-4
Client.php
lib/Doctrine/Resource/Client.php
+1
-1
Table.php
lib/Doctrine/Resource/Table.php
+0
-1
index.php
playground/index.php
+3
-1
schema.xml
tests/schema.xml
+1
-1
schema.yml
tests/schema.yml
+6
-0
No files found.
lib/Doctrine/Resource/Client.php
View file @
77daa29c
...
...
@@ -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
"
;
...
...
lib/Doctrine/Resource/Table.php
View file @
77daa29c
...
...
@@ -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'
];
}
}
...
...
playground/index.php
View file @
77daa29c
...
...
@@ -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();
...
...
tests/schema.xml
View file @
77daa29c
This diff is collapsed.
Click to expand it.
tests/schema.yml
View file @
77daa29c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment