DM 1.0 compat: do not use Entity::toArray

Change-Id: I7f4eecf76e93c2e0f4c1a50bcdb3e71ee20dbe5b
Merge "DM 1.0 compat: do not use Entity::toArray"