Added insert or update, added support for generated ids, fixed null serializable object crash.