Hi folks
Obviously for the simple stuff, its great to have shortcuts. But one handy thing about CI/Datamapper ORM is, when database queries get complex, you can always use the query() method to write your own sql query (with bindings), and it would populate your model.
Does such a method exist in either Model_Crud or Orm? I haven't found it so far. I like the shortcuts, find() etc., but I dont want to have to use them if I base my model on either Model_Crud or Orm\Model.
Colm
In FuelPHP both Model_Crud and Orm\Model are layers on top of the query builder, but they are not an extension of that query builder, so you can't do what you can do in Datamapper.
Instead, you run a normal query builder query, and ask it to return the results as model objects:
Which will return an array of Model_Mymodel objects. This definately works with ORM models, I haven't used this technique with Model_Crud, but I'm pretty sure it works there too.