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
abcc423f
Commit
abcc423f
authored
May 21, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new relation parser now supports many-to-many relations
parent
4f57aac3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Parser.php
lib/Doctrine/Relation/Parser.php
+11
-3
No files found.
lib/Doctrine/Relation/Parser.php
View file @
abcc423f
...
...
@@ -136,7 +136,8 @@ class Doctrine_Relation_Parser
$def
[
'refTable'
]
->
getRelationParser
()
->
bind
(
$this
->
_table
->
getComponentName
(),
array
(
'type'
=>
Doctrine_Relation
::
ONE
));
$this
->
bind
(
$def
[
'refClass'
],
array
(
'type'
=>
Doctrine_Relation
::
MANY
));
$this
->
bind
(
$def
[
'refClass'
],
array
(
'type'
=>
Doctrine_Relation
::
MANY
,
'foreign'
=>
$def
[
'local'
]));
}
if
(
in_array
(
$def
[
'class'
],
$localClasses
))
{
return
new
Doctrine_Relation_Association_Self
(
$def
);
...
...
@@ -206,7 +207,14 @@ class Doctrine_Relation_Parser
return
$columns
;
}
public
function
guessColumns
(
$classes
,
Doctrine_Table
$foreignTable
)
/**
* guessColumns
*
* @param array $classes an array of class names
* @param Doctrine_Table $foreignTable foreign table object
* @return array an array of column names
*/
public
function
guessColumns
(
array
$classes
,
Doctrine_Table
$foreignTable
)
{
$conn
=
$this
->
_table
->
getConnection
();
...
...
@@ -304,7 +312,7 @@ class Doctrine_Relation_Parser
}
}
throw
new
Relation_Parser_Exception
(
"Couldn't complete relation definition."
);
throw
new
Doctrine_
Relation_Parser_Exception
(
"Couldn't complete relation definition."
);
}
}
return
$def
;
...
...
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