Caused by: org.hibernate.AnnotationException: No identifier specified for entity: "entity명"

Yunny.Log ·2022년 11월 24일
0

Debugging

목록 보기
53/69
post-thumbnail
post-custom-banner
@Entity
@Getter
@Table(name="latLonPair")
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class LatLonPair {

    
    private List<Double> lat = new ArrayList<>();
    private List<Double> lon = new ArrayList<>();

    public void addLatLon(double lat, double lon){
        this.lat.add(lat);
        this.lon.add(lon);
    }
}
  • 단순한 에러 였다, id 필드를 생성안해주었기 때문이다 ,,
  • 아래 아이를 추가해쥼!
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE3")
    @SequenceGenerator(name="SEQUENCE3", sequenceName="SEQUENCE3", allocationSize=1)
    @Column(name = "~~_id")
    private Long id;
post-custom-banner

0개의 댓글