• 23rd July 2009 - By dan

    Just a quick one today, if you find you are having to use nested Set::Extracts or nested foreach loops in your code to extract data then it is possible you have some incorrect associations.

    For instance if you array looks like this:

    Array  (     [0] => Array         ( Array (    [0] => Array         ( 

    It is possible that you have a hasMany where you should have an hasOne or belongsTo association.

    Share with your friends and help out this site:
    • Digg
    • del.icio.us
    • Facebook
    • Google Bookmarks
    • E-mail this story to a friend!
    • LinkedIn
    • Live
    • Reddit
    • StumbleUpon
    • Twitter
    • Yahoo! Bookmarks

Ad