[eluser]WanWizard[/eluser]
[quote author="Chillahan" date="1304981137"]I looked at DataMapper but it seemed discontinued - I did find a release date from January of this year in the link you sent, so I guess I was unsuccessful in finding the updated version![/quote]
Don't know where you looked (but I'd like to know), but Datamapper is indeed far from dead!
I can't comment on other solutions, but with Datamapper, the ORM models replace the standard CI models.
Datamapper provides them with a lot of functionality to make relations and CRUD operations. You simply add the methods needed by your business logic.
As per your example:
Code:
// get all classes by id
$myClass = new Class();
$myClass->get();
// create a class object for class $classID
$myClass = new Class($classID);
// for this class, get all grades below a value
$myClass->grades->where('grade <', $grade)->get();
// some complicated calculations in a custom model method called getgrades()
$myClass->getgrades();