How to fix “java.sql.SQLException: Column 'id' not found.” error in Spring Boot
问题 There are 2 entities: Deck and Card. Each Deck contains 8 out of 100 possible Cards. Since each Deck contains more than one Card and the Card can also be part of many different Decks, I joined them by creating a new table called deck_cards. @Data @Entity @Table(name = "cards") public class Card { @Id private Integer id; @NotBlank private String icon; @NotBlank private String name; @ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE }, mappedBy = "cards")