jpa Basic mapping Omitting field from the mapping


class Note {
    Integer id;
    String note;

    String parsedNote;

    String readParsedNote() {
        if (parsedNote == null) { /* initialize from note */ }
        return parsedNote;

If your class needs fields that should not be written to the database, mark them as @Transient. After reading from the database, the field will be null.