Is this a good way to make fields accessible for an empty entity object?
I too was looking for an answer to this question, however you question has provided me with the best answer so far.

My implementation of your solution was to call your function in my entity create function and then loop over the values attaching the fields as empty arrays:

function MY_ENTITY_create($values = array()) {
    $entity = entity_get_controller('MY_ENTITY')-&gt;create($values);
    foreach(_get_fields_for_entity('MY_ENTITY') as $field) {
        $entity-&gt;{$field} = array();
    }
    return $emtr_safe_check;
}

function _get_fields_for_entity($entity) {
    $result = db_select('field_config_instance', 'f')
        -&gt;fields('f', array('field_name'))
        -&gt;condition('entity_type', $entity)
        -&gt;condition('bundle', $entity)
        -&gt;execute()
        -&gt;fetchAllAssoc('field_name');

        return array_keys($result);
}


As my entity does not have a bundle, but my module does define several different entities I modified your function slightly to handle loading fields for different entities with bundles of the same name.

I would still be interested to see other peoples solution to this problem.