Welcome Guest, Not a member yet? Register   Sign In
Is this really ActiveRecord?
#1

[eluser]7bit[/eluser]
Hello,

I'm new to CI and am in the process of exploring the possibilities of the framework. So far I looks very nice to me. But I have a question regarding the ORM:

In the manual it says you should derive your domain objects from the class Model. It also says it is using some kind of ActiveRecord, but looking inside the declaration of the Model class i can't see any reference to any built in ActiveRecord functionality. I would have expected that I just can declare a class Foo that would extend Model, declare just a few variables to tell the model about its relationships to other tables and then it would automatically have all needed functionality to represent fully working 'foo' objects transparently connected to the 'foo' table, able to load, update, save and pull in other objects that represent data in related tables and so on. Instead the manual states that I have to manually declare functions like find_foo(), find_bar(), save(), do_whatever() and inside all this manually written functions i have to manually call almost naked db driver functions like $this->db->get(), $this->db->insert(), $this->db->update(), $this->db->foobar() over and over again. This doesn't look like anything near ActiveRecord at all.

(?)

Did I completely misunderstand something here? I know that there are many 3rd party ORM modules for CI but i would like to understand the concept behind CIs "ActiveRecord" and maybe an example how to use it correctly so that it really looks and feels like all the other ActiveRecord implementations I have seen. I haven't found much documentation about this subject.

TIA,
Bernd


Messages In This Thread
Is this really ActiveRecord? - by El Forum - 09-13-2008, 08:36 AM
Is this really ActiveRecord? - by El Forum - 09-13-2008, 08:58 AM
Is this really ActiveRecord? - by El Forum - 09-13-2008, 09:06 AM
Is this really ActiveRecord? - by El Forum - 09-13-2008, 01:00 PM
Is this really ActiveRecord? - by El Forum - 09-13-2008, 02:06 PM
Is this really ActiveRecord? - by El Forum - 09-14-2008, 03:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB