I will preface this issue with - I understand how associations work.
I'm trying to convert to CFW 2.2 but have been using 1.4.5 for a long time.
Controller is as follows;
component extends="Controller" {
function index() {
tournaments = model("Tournament").findAll(where="fk_clubID = 2", include="TournamentType", order="isComplete, eventDate");
}
}
Model is as follows:
component extends="Model" {
function config() {
hasOne(name="tournamentSeason", jointype="inner", foreignkey="TournamentSeasonID", joinkey="fk_tournamentSeasonID");
hasOne(name="tournamentType", jointype="inner", foreignkey="TournamentTypeTypeID", joinkey="fk_tournamentTypeID");
}
}
but i'm receiving an AssociationNotFound.
So... I'm a bit lost as to why. it's as if it's not even finding it - at all.
Any information would be helpful.