#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:
> (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),
> );
> }}}
New description:
(My apologize to mahono: I accidentally wiped your description when I
wanted to add a comment, and didn't find any way to revert it. -- tamcy)
This ticket is about, as the subject tells, supporting composite key
relations, and proposed with the following syntax:
{{{
array('local' => array('col_a', 'col_b'), 'foreign' => array('col_a',
'col_b'));
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/460#comment:11>
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
-~----------~----~----~----~------~----~------~--~---