title: JPA/SpringBoot Repository for database view (not table)
body: <p>I'm attempting to create a JPA entity for a view. From the database layer, a table and a view should be the same.</p>
  
  <p>However, problems begin to arise and they are two fold:</p>
  
  <ol>
  <li><p>When attempting to setup the correct annotations. A view does not have a primary key associated with it, yet without the proper <code>@javax.persistence.Id</code> annotated upon a field, you will get an <code>org.hibernate.AnnotationException: No identifier specified for entity</code> thrown at Runtime.</p></li>
  <li><p>The Spring Boot <code>JpaRepository</code> interface definition requires that the <code>ID</code> type extends <code>Serializable</code>, which precludes utilizing <code>java.lang.Void</code> as a work-around for the lack of an id on an view entity.</p></li>
  </ol>
  
  <p>What is the proper JPA/SpringBoot/Hibernate way to interact with a view that lacks a primary key?</p>