#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 |
--------------------------+-------------------------------------------------
Old description:
> It seems that there is no support for composite keys relations!?
> What I miss is a way to setup a relation with composite keys with one
> single method, something like this:
>
> $this->hasOne('!RuleCondition as Condition', array(
> 'local' => array('rule_id', 'class_name'),
> 'foreign' => array('rule_id', 'class_name')
> ));
New description:
(Sorry that I messed up the syntax)
It seems that there is no support for composite keys relations!?
What I miss is a way to setup a relation with composite keys with one
single method, something like this:
FROM User u LEFT JOIN User r
''' ON u.user_regno = r.user_regno AND u.yr = r.yr AND u.is_root = 1; '''
{{{
$this->hasOne('User as RootAccount',
array('local' => 'user_regno', 'foreign' => 'user_regno'),
array('local' => 'yr', 'foreign' => 'yr'),
array('foreign' => 'is_root', 'value' => 1),
);
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/460#comment:10>
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
-~----------~----~----~----~------~----~------~--~---