Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.0-ALPHA1, 1.2.0-ALPHA2, 1.2.0-ALPHA3, 1.2.0-BETA1, 1.2.0-BETA2, 1.2.0-BETA3, 1.2.0-RC1, 1.2.0, 1.2.1, 1.2.2, 1.2.3
-
Fix Version/s: None
-
Component/s: Relations
-
Labels:None
-
Environment:Windows Server 2003 SP2
Apache 2.2.14
PHP 5.3.1
Doctrine 1.2.2
Description
I have 2 tables.
t1 :
id [Primary Key]
field1
field2
...
fieldn
t2_id [related to t2.id]
—
primary key: id
t2:
—
id [related to t1.t2_id]
fixed_set [predefined set of values (for example "a", "b", "c")]
field1
field2
...
fieldn
—
primary key: id + fixed_set
I need to use relation like follows:
SELECT *
FROM t1
LEFT JOIN t2 ON (t1.t2_id = t2.id AND t2.fixed_set = "a")
There is followed text in phpdoc from Relation.php:
—
- local the local field(s)
* - foreign the foreign reference field(s)
—
But it is unable to use several fields in "local" and "foreign", only one "local" and "foreign" field.