1) Create schema with foreign key to table bar and you can get access to
fields of table bar using following code:

$foo->getBar()->getSomeFiled()

2)
Try to use:

$c->addJoin(foo::barA, bar::fooA, Criteria::LeftJoin);
$c->addJoin(foo::barB, bar::fooB, Criteria::LeftJoin);

and you get:

SELECT * FROM foo JOIN bar ON (foo.barB = bar.fooB);


2008/1/9, NekoKun <[EMAIL PROTECTED]>:
>
>
> Hi, Im posting this to know if this 'issue' has been fixed or not.
>
> When doing a JOIN, you use:
>
> $c->addJoin(foo::bar, bar::foo, Criteria::leftJoin);
>
> and it will make:
>
> SELECT * FROM foo, bar WHERE foo.bar = bar.foo;
>
> But if you have 2 fields and try:
>
> $c->addJoin(foo::barA, bar::fooA, Criteria::leftJoin);
> $c->addJoin(foo::barB, bar::fooB, Criteria::leftJoin);
>
> it will just make
>
> SELECT * FROM foo, bar WHERE foo.barB = bar.fooB;
>
> Then my question are:
> 1) How to use multiple fields?
>
> 2) How to build the join like: SELECT * FROM foo JOIN bar ON (foo.barB
> = bar.fooB);
>
> Thanks
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to