• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ActiveRecord library - one to one solution proposal

#8
[eluser]esbium[/eluser]
Buddy,

Thanks for the ActiveRecord class (and anyone else who worked on it)! I have spent the last couple of days really reading and understanding the source code and I have some new ideas that I would like to share over the course of the next few weeks.

As I mentioned, I come from a java background and have been using Hibernate for a while now. In Hibernate, and other java ORM libraries, one can get child objects like so:

Code:
//JAVA Code - is this kind of code allowed on the CI forums? (lol)  ;-)
Project project = projectDao.findById(1);
for(Task task : project.getTasks())
{
    //do something with the task object here...
}

I have grown used to this and love how it works. Hibernate takes care of lazy loading the tasks once getTasks is called. This works after minimal configuration of course!

With that said, I have set out to build something similar on top of your ActiveRecord class by extending it and adding the functionality I want. I have the above example working with minimal configuration and its great! I will post the code once I have more to share, should be soon as I am developing this for a project I am consulting on right now.


Messages In This Thread
ActiveRecord library - one to one solution proposal - by El Forum - 09-28-2007, 05:50 PM
ActiveRecord library - one to one solution proposal - by El Forum - 09-29-2007, 04:09 PM
ActiveRecord library - one to one solution proposal - by El Forum - 09-29-2007, 04:58 PM
ActiveRecord library - one to one solution proposal - by El Forum - 09-29-2007, 05:14 PM
ActiveRecord library - one to one solution proposal - by El Forum - 09-30-2007, 12:43 AM
ActiveRecord library - one to one solution proposal - by El Forum - 09-30-2007, 06:46 AM
ActiveRecord library - one to one solution proposal - by El Forum - 09-30-2007, 10:23 AM
ActiveRecord library - one to one solution proposal - by El Forum - 09-30-2007, 12:03 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.