After reading several threads to that topic (one was marked as "solved" although the problem was unanswered) I tried to join two tables:
DBMRL1 (participants):
Table -> is12_participants
ModelID -> ParticipantsList
Load Data -> Yes
Data Load Type -> All
Enable Associations -> Yes
JOIN Type -> Left
JOIN Rule -> ParticipantsList.cf_country=CountryCode.country_code
Associated Models -> CountryCode
WHERE Statement -> 1 ORDER BY country_name, cf_lastname, cf_firstname
DBMRL2 (country-code):
Table -> is12_countrycode
ModelID -> CountryCode
Load Data -> No
Enable Associations -> No
I expected a Query like this:
Getting no data, I let the debugger find out that the query made by CF looks like this:
So the JOIN command is missing at all and the SELECT command gets a wrong parameter `ParticipantsList`. connected to the asterisk.
How can this be fixed?
DBMRL1 (participants):
Table -> is12_participants
ModelID -> ParticipantsList
Load Data -> Yes
Data Load Type -> All
Enable Associations -> Yes
JOIN Type -> Left
JOIN Rule -> ParticipantsList.cf_country=CountryCode.country_code
Associated Models -> CountryCode
WHERE Statement -> 1 ORDER BY country_name, cf_lastname, cf_firstname
DBMRL2 (country-code):
Table -> is12_countrycode
ModelID -> CountryCode
Load Data -> No
Enable Associations -> No
I expected a Query like this:
"SELECT * FROM is12_participants LEFT JOIN is12_countrycode ON is12_participants.cf_country = is12_countrycode.country_code WHERE 1 ORDER BY country_name, cf_lastname, cf_firstname"
Getting no data, I let the debugger find out that the query made by CF looks like this:
"SELECT `ParticipantsList`.* FROM `is12_participants` AS `ParticipantsList` WHERE 1 ORDER BY country_name, cf_lastname, cf_firstname"
So the JOIN command is missing at all and the SELECT command gets a wrong parameter `ParticipantsList`. connected to the asterisk.
How can this be fixed?