WrongClassException: Object [id=null] was not of the specified subclass
I have a model like this one below: @Entity(name = "request") public class VisitRequest { @Id @GeneratedValue private Long id; @OneToMany(mappedBy = "visitRequest", cascade = CascadeType.ALL, orphanRemoval = true) @JsonManagedReference private List<Visitor> visitors; //default constructor, getters and setters } @Entity @Inheritance(strategy = InheritanceType.JOINED) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "class") public class Visitor { @Id @GeneratedValue private Long id; @ManyToOne @JsonBackReference private VisitRequest visitRequest; //defau
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.