allow store to deserialize polymorphic relationships

With this change, no need to change the JSON structure to have all
objects at the root, with referential ids in the value of the parent
attributes