On Wed, Feb 20, 2008 at 4:13 AM, manish <[EMAIL PROTECTED]> wrote: > > I have also been getting problems of associations not working for me > sometimes, while some other times associations work perfectly. I have > some questions regarding associations. I hope I am doing no wrong by > continuing this thread and not starting a new one: > > 1. Is there no way at all to check why my associations are not > working, > because nothing is shown in debugging. If association is not working, > it will simply be out of your SQL, giving no clue?
I wish I knew that as well. > 2. How important is the name of the key?As mentioned above by DJ Spark > Can the name of keys be the reason my associations are not Working? Maybe, with a good chance of probably. > 3. What is the logic behind naming the key? DJ Spark above mentioned > that > that key name should be ParentPerson rather than Parent. I did not > understand > the logic of naming here. Because Cake needs some way to keep them separate or the logic wouldn't work. ParentPerson is just an alias so that Person<->Person associations can be dealt with internally. "Parent" is appended to the associated model name to make it obvious which model it's the parent of. Imagine that you were dealing with 4 models, 2 of which were reflexively-associated with the other 2. By using ParentModelName everything is crystal clear. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
