#460: support for composite keys relations
--------------------------+-------------------------------------------------
Reporter: mahono | Owner: romanb
Type: enhancement | Status: new
Priority: critical | Milestone: 2.0.0
Component: Other | Version:
Resolution: | Keywords: composite keys relation
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
--------------------------+-------------------------------------------------
Comment (by tamcy):
I think it would be event better to have the following possible:
... FROM User u
LEFT JOIN User r
[b]ON u.user_regno = r.user_regno AND u.yr = r.yr AND u.is_root = 1;[/b]
The syntax may be written like this:
[code]
$this->hasOne('User as RootAccount', array(
array('local' => 'user_regno', 'foreign' => 'user_regno'),
array('local' => 'reg_no', 'foreign' => 'reg_no'),
array('foreign' => 'is_root', 'value' => 1),
));
[/code]
--
Ticket URL: <http://trac.doctrine-project.org/ticket/460#comment:9>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---