Bugfix on insertupdate return value in EntityModel and InMemoryDataDriver. Added unit tests for insertupdate.