Is there a way to update a record in a table using an ORM model without any extra queries?
I know that I can simply use DB object to do a raw query, but I would like to do it with an ORM object.
I have the following code.
$orm = ORM::factory("myobject",1);
$orm->name = "new name";
$orm->save();
the problem of the code is that it executes a select query then executes an update query.
I've tried the following as well.
ORM::factory("myobject")->values(array("id"=>1, "name"=>"my new name"))-save();
the problem of this query is that the ORM executes "show full columns from myobject"
How do I make an update query on an ORM object without executing any extra queries?