Class LocalDateTimeField

All Implemented Interfaces:
ByteEncodedField<LocalDateTime>, StringEncodedField<LocalDateTime>, Field<LocalDateTime>, Comparable<Field<LocalDateTime>>

public class LocalDateTimeField
extends BasePrimitiveField<LocalDateTime,​LocalDateTimeFieldKey>
LocalDateTime stores the value of nanoseconds in a range from 0 to 999,999,999. However, the MySQL DATETIME column type cannot handle this level of granularity (it can handle at most 6 digits of fractional seconds). LocalDateTimeField defaults to a truncation of the LocalDateTime nanosecond value of up to 3 fractional seconds as this corresponds to the fractional seconds granularity of System.currentTimeMillis() and LocalDateTime.now(). This is the recommended use, but can be overridden to store the full value. A LocalDateTime object created using LocalDateTime::of might not be equivalent to a LocalDateTime retrieved from MySQL because of the truncation of nanoseconds. Use .now() or use the LocalDateTime::of method that ignores the nanoseconds field