Package dev.morphia

Class VersionMismatchException

  • All Implemented Interfaces:
    Serializable

    public class VersionMismatchException
    extends ConcurrentModificationException
    This exception is thrown when a version field does not match the expected state in the database. It's thrown when a versioned entity is changed by another process after it was loaded but before any changes were written back to the database.
    Since:
    2.2
    See Also:
    Serialized Form
    • Constructor Detail

      • VersionMismatchException

        public VersionMismatchException​(Class<?> type,
                                        @Nullable
                                        Object idValue)
        Creates a new exception with a message.
        Parameters:
        type - the versioned type
        idValue - the ID value