Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord for CodeIgniter: Rails-style model interactions
#43

[eluser]Piinaaja[/eluser]
[quote author="chrisj" date="1191395545"]Thanks BB & NM.

I found some major bugs with my _fetch_related function, however. Here's the new and improved version:
Code:
function _fetch_related($table, $inflected)
    {
       ...          
    }
[/quote]

Hi chrisj, thanks for adding improved relations fetching, it helps a lot!
I noticed that you might have a bug in the updated _fetch_related, the part where it searches for has_many or has_one, I think the line ending should be:

Code:
WHERE '. $this->_class_name .'_id = '.$this->id);
instead of:
Code:
WHERE '. $this->_class_name .'_id = id');


Messages In This Thread
ActiveRecord for CodeIgniter: Rails-style model interactions - by El Forum - 10-04-2007, 12:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB