Welcome Guest, Not a member yet? Register   Sign In
Does ActiveRecord class come with Codeigniter?
#1

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

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

[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
#4

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

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

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

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

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

[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
#10

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




Theme © iAndrew 2016 - Forum software by © MyBB