I found a reason. The ORM related data is not appeared without access by it's property.
1) <ViewModel> Get "$users" ORM instance list. 2) <ViewModel> Escape "$users" by "$view->set()". 3) <View> "$users" is exploded to HTML.
At 2) process, "$user->office" property is not accessed. The args for View don't contain "$user->$office", so "$view->set()" cannot escape "$user->office".
I thought that's a little wrong system. I wonder why ORM objects don't contain related objects first time?
Correct. If you need something, fetch it explicitly. No need to run potentially gigantic queries if it's not needed.
As for ORM objects, and passing data to a view: set() always encodes anything, unless you use false as third parameter. set_safe() doesn't encode anything (it's an alias for set() with false).
As encoding always changes the value (if there is something to encode), it will modify your ORM properties, so if you do that, don't use the object elsewhere, and certainly not save it. This is because objects are passed by reference in PHP, so once you change one, you change them all.
As a workaround, you can pass:
(object) $ormobject->to_array();
which will convert the properties to an array first, and then to a stdClass.