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
b3b1f617
Commit
b3b1f617
authored
May 21, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
c06c81dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
Parser.php
lib/Doctrine/Relation/Parser.php
+29
-5
ParserOld.php
lib/Doctrine/Relation/ParserOld.php
+2
-2
No files found.
lib/Doctrine/Relation/Parser.php
View file @
b3b1f617
...
...
@@ -140,19 +140,43 @@ class Doctrine_Relation_Parser
'foreign'
=>
$def
[
'local'
]));
}
if
(
in_array
(
$def
[
'class'
],
$localClasses
))
{
return
new
Doctrine_Relation_Association_Self
(
$def
);
$rel
=
new
Doctrine_Relation_Association_Self
(
$def
);
}
else
{
return
new
Doctrine_Relation_Association
(
$def
);
$rel
=
new
Doctrine_Relation_Association
(
$def
);
}
}
else
{
$def
=
$this
->
completeDefinition
(
$def
);
if
(
!
isset
(
$def
[
'foreign'
]))
{
Doctrine
::
dump
(
$def
);
}
return
new
Doctrine_Relation_ForeignKey
(
$def
);
$rel
=
new
Doctrine_Relation_ForeignKey
(
$def
);
}
if
(
isset
(
$rel
))
{
unset
(
$this
->
_pending
[
$name
]);
return
$rel
;
}
}
if
(
$recursive
)
{
return
$this
->
getRelation
(
$name
,
false
);
}
else
{
throw
new
Doctrine_Table_Exception
(
$this
->
options
[
'name'
]
.
" doesn't have a relation to "
.
$name
);
}
}
/**
* getRelations
* returns an array containing all relation objects
*
* @return array an array of Doctrine_Relation objects
*/
public
function
getRelations
()
{
foreach
(
$this
->
_pending
as
$k
=>
$v
)
{
$this
->
getRelation
(
$k
);
}
return
$this
->
_relations
;
}
/**
* Completes the given association definition
*
...
...
@@ -310,8 +334,8 @@ class Doctrine_Relation_Parser
return
$def
;
}
}
}
}
Doctrine
::
dump
(
$this
->
_table
->
getComponentName
());
Doctrine
::
dump
(
$def
);
throw
new
Doctrine_Relation_Parser_Exception
(
"Couldn't complete relation definition."
);
}
}
...
...
lib/Doctrine/Relation/ParserOld.php
View file @
b3b1f617
...
...
@@ -178,8 +178,8 @@ class Doctrine_Relation_ParserOld
$lower
=
strtolower
(
$name
);
if
(
isset
(
$this
->
columns
[
$lower
]
))
{
throw
new
Doctrine_
Table
_Exception
(
"Couldn't bind relation. Column with name "
.
$lower
.
' already exists!'
);
if
(
$this
->
_table
->
hasColumn
(
$lower
))
{
throw
new
Doctrine_
Relation
_Exception
(
"Couldn't bind relation. Column with name "
.
$lower
.
' already exists!'
);
}
$e
=
explode
(
' as '
,
$name
);
...
...
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