Does ActiveRecord class come with Codeigniter? |
[eluser]coldscooter[/eluser]
I see some files relating to ActiveRecord within the system files, but if i try to extend ActiveRecord in a model, it says "Unable to load the requested class: activerecord" Do i need to download it separately?
[eluser]Samus[/eluser]
The database classes can't simply be extended, per the user guide.
[eluser]coldscooter[/eluser]
Really? I'm using this CI wiki page to add ActiveRecord: http://codeigniter.com/wiki/ActiveRecord_Class/ In this example they extend ActiveRecord
[eluser]Samus[/eluser]
[quote author="coldscooter" date="1336690335"]Really? I'm using this CI wiki page to add ActiveRecord: http://codeigniter.com/wiki/ActiveRecord_Class/ In this example they extend ActiveRecord[/quote] There's a difference in creating a library and extending an existing one. Well you could say they 'extended' it. It was just extended in a less hacky way.
[eluser]coldscooter[/eluser]
It's failing for me because it can't find /libraries/Model.php Has this file changed in the more recent releases of CI?
[eluser]Samus[/eluser]
Not too sure, but maybe ensure BASEPATH is defined in 'index.php' ?
[eluser]CroNiX[/eluser]
Yes, it's in /system/core/Model.php. There's a lot in there that you will have to change as it was written for a previous version of CI.
[eluser]coldscooter[/eluser]
Yes my basepath is set. But i have no Model.php in my ci installation...?
[eluser]coldscooter[/eluser]
[quote author="CroNiX" date="1336691912"]Yes, it's in /system/core/Model.php. There's a lot in there that you will have to change as it was written for a previous version of CI.[/quote] Ah ok thanks for the info
[eluser]coldscooter[/eluser]
[quote author="CroNiX" date="1336691912"]Yes, it's in /system/core/Model.php. There's a lot in there that you will have to change as it was written for a previous version of CI.[/quote] So is there a current ORM that you could recommend for the latest version of Codeigniter? |
Welcome Guest, Not a member yet? Register Sign In |