I have an @Entity which is mapped to a view, here is how it looks
import org.hibernate.annotations.Immutable;
import javax.persistence.*;
@Table(na
The @Subselect annotation is the only annotation in Hibernate that prevents the creation of the corresponding table for an @Entity:
@Entity
@Subselect("select * from user_earning")
public class UserFlightEarning {
@Id
public Long userId;
public Long flightId;
@Column(name = "flight_seq")
public Long flightSequence;
}