It is an older question, and Spring JPA has evolved a lot since then, but I am putting this information here in case someone runs into this from the search engine.
The details are described in https://www.baeldung.com/jpa-mapping-single-entity-to-multiple-tables, but in short you can create a single entity specifying that we have columns in different tables using the @SecondaryTable annotation. However for my personal project that is not appropriate, although it may work for others. There is also multiple entities using the @PrimaryKeyJoinColumn annotation:
public abstract class LogRelation implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Long id;
@OneToOne
@PrimaryKeyJoinColumn(name = "id")
Log log;
// ...
}
Another small update ... under the current version of JPA, you are best to make the fields protected/private and access them only by Getter/Setter, which ensures the population of lazy fields.