fix(base-model): support graph inserts
Some changes that I found helpful when using BaseModel
. Happy to be persuaded that they are not for everyone.
- Allow graph inserts by allowing proxy to set special #id and #ref properties
- Make relation properties settable without being in the schema
- Fall back to inserting a model if updating fails which allows setting the ID to a known value. Previously it threw an error when trying to log the update.