I want to save results to cache but datamapper result objects is huge array.
I want to get only my query results without other data that referenced codeigniter data (models/configs/languages/etc..)
How can do this?
I searched on SO, internet and manual page (http://datamapper.wanwizard.eu/) but i couldnt find anything..
If you just want to access the core information about your records, try using the array extension here: http://datamapper.wanwizard.eu/pages/extensions/array.html
This allows you to run something like:
... which returns an array of objects, with all properties, but without the models/configs/languages &c. that you mention.
I want to addition some tips on @sevenpointsix answer
If you are using
include_related, you have to specify columns like following (
$fields = array('id', 'title', 'user_firstname', 'user_lastname', 'category_name'); $posts->get()->all_to_array($fields);