updateAndGet

fun updateAndGet(schema: TableSchema, old: Any, new: Any, consistency: KandraConsistency? = null, ttlSeconds: Int? = null, serialConsistency: KandraConsistency = KandraConsistency.LOCAL_SERIAL): Any

Same write path as update, but returns the entity actually persisted — with the post-update @Version (and @UpdatedAt) injectVersion/injectTimestamps computed for the write, instead of discarding that copy the way update does. See GH #136: a caller who relied on update()'s Unit return and then reused the pre-update version it already had for a subsequent optimistic-locked update got a spurious KandraOptimisticLockException against a write that had actually succeeded — it never learned its own prior write's resulting version.