add EntityWithId and EntityWithVersion
implement deserialization