Question about optimistic locking/documentation

Would you thus agree that having a non-nullable version column and a nullable Java type in the entity (like Integer) would be the best way to go?

Yes