I've managed to sort my problem out, but it involved changing the cake/ lib/model/model.php code to stop it generating foreignkeys when they didn't exist. Works for me since I always specify foreignkeys if I'm using them, still worried that I'm just missing something if it's working for others.
On Jan 29, 11:49 am, CrazyDave <[EMAIL PROTECTED]> wrote: > On Jan 29, 11:21 am, grigri <[EMAIL PROTECTED]> wrote: > > > > I'm trying to do a join that does not depend on a foreign key, but > > > uses other clauses that I provide via the conditions attribute. > > > Unfortunately I can't seem to get CakePHP to stop adding the > > > foreignKey, even when I set it to null, an empty string or false. > > > What exact version are you using? This works fine for me. According to > > trac, it was fixed in [6258] > > >https://trac.cakephp.org/ticket/3323https://trac.cakephp.org/changese... > > I'm using 1.2.0.6311 beta, I even tried reverting the model code to > 6258 but it's still adding the foreignKey. Does it only work for > certain relationships or should it work for all types? > > AD7six, the parent_id helps make the join more simple but doesn't > solve the issue that I want the news model to bring back it's owner > (news.structure_id = structure.id) and it's immediate parent > (structure.parent_id = structalias.id). > > Thanks, > Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
