java.time YearMonth as a type within entity
问题 How do you use YearMonth within an entity? I have seen a lot of stack overflow answers about a converter? Is this still needed and if so how? @Basic(optional = false) @NotNull @Column(name = "cc_exp_date") private YearMonth ccExpDate; The exception I am getting is below. Could I just convert this into a date within the set method and convert back to YearMonth within the get method of the entity as a work around? MysqlDataTruncation: Data truncation: Incorrect date value: '\xAC\xED\x00\x05sr