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
2125718d
Commit
2125718d
authored
Oct 29, 2007
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
important hint about which columns local and foreign refer to in Many-To-Many relationships
Ticket: 538
parent
13f2ea77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
relations.txt
manual/docs/en/relations.txt
+4
-4
No files found.
manual/docs/en/relations.txt
View file @
2125718d
...
@@ -181,8 +181,8 @@ class User extends Doctrine_Record
...
@@ -181,8 +181,8 @@ class User extends Doctrine_Record
{
{
public function setUp()
public function setUp()
{
{
$this->hasMany('Group', array('local' => 'user_id',
$this->hasMany('Group', array('local' => 'user_id',
// <- these are the column names
'foreign' => 'group_id',
'foreign' => 'group_id',
// <- in the association table
// the following line is needed in many-to-many relations!
// the following line is needed in many-to-many relations!
'refClass' => 'GroupUser'));
'refClass' => 'GroupUser'));
...
@@ -196,8 +196,8 @@ class User extends Doctrine_Record
...
@@ -196,8 +196,8 @@ class User extends Doctrine_Record
class Group extends Doctrine_Record
class Group extends Doctrine_Record
{
{
public function setUp() {
public function setUp() {
$this->hasMany('User', array('local' => 'group_id',
$this->hasMany('User', array('local' => 'group_id',
// <- these are the column names
'foreign' => 'user_id',
'foreign' => 'user_id',
// <- in the association table
// the following line is needed in many-to-many relations!
// the following line is needed in many-to-many relations!
'refClass' => 'GroupUser'));
'refClass' => 'GroupUser'));
}
}
...
...
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