CodeIgniter Forums
Does ActiveRecord class come with Codeigniter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Does ActiveRecord class come with Codeigniter? (/showthread.php?tid=51610)

Pages: 1 2


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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?


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[eluser]Samus[/eluser]
The database classes can't simply be extended, per the user guide.


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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.


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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?


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[eluser]Samus[/eluser]
Not too sure, but maybe ensure BASEPATH is defined in 'index.php' ?


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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.


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[eluser]coldscooter[/eluser]
Yes my basepath is set. But i have no Model.php in my ci installation...?


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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


Does ActiveRecord class come with Codeigniter? - El Forum - 05-10-2012

[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?