Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity: com..domain.idea.MAE_MFEView

Why am I getting this exception? package com.domain.idea; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; import org.hibernate.annotations.AccessType; /** * object model for the view [InvestmentReturn].[vMAE_MFE] */ @Entity @Table(name=”vMAE_MFE”, schema=”InvestmentReturn”) @AccessType(“field”) public class MAE_MFEView { /** * trade property is a SuggestdTradeRecommendation object */ @OneToOne(fetch = FetchType.LAZY , cascade = { … Read more

Confusion: @NotNull vs. @Column(nullable = false) with JPA and Hibernate

When they appear on a field/getter of an @Entity, what is the difference between them? (I persist the Entity through Hibernate). What framework and/or specification each one of them belongs to? @NotNull is located within javax.validation.constraints. In the javax.validation.constraints.NotNull javadoc it says The annotated element must not be null but it does not speak of … Read more