| HI there, supposing to have an abstract SuperClass, with a single table inheritance, like this:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorFormula("...")
@Table(name = "groups")
public abstract class AbstractGroup<H extends AbstractGroup<H>> implements Serializable {
@ManyToOne
@JoinColumn(name = "parent_groupid", referencedColumnName = "groupid")
private H parent;
}
You can receive this error message:
I think that you could accept target type as an instance of AbstractGroup, because you're using inheritance on a single table, so you could know which is the right class. What do you think about this? |