added version attribute for optimistic locking on create and update