I have a project that uses Propel 2 and there are two tables that I want to join on a certain field, but there is no foreign-key relationship there. I just want to match them up based on that value. Unfortunately I cannot get it to work, and Propel's documentation, thorough as it tries to be, still lacks a good reference. How can I do it?
What I have tried:
echo Table1Query::create()
->addJoin(Table1TableMap::COL_A, Table2TableMap::COL_B)
->where('Table2.C=?', 'asd')
->toString();
This fails at the where()
part with System error Cannot determine the column to bind to the parameter in clause "Table2.C=?".
I know I can get the PDO connection and drop back into pure SQL, which would definitely be easier, but it kinda feels wrong when using an ORM (then again...).