* Ensure that id is set before insert
* Fix embedded array "not array" error if embedded array is not set