@Entity
@DiscriminatorColumn("type")
@Inheritance
public abstract class GameCharacter {
}
@Entity
@DiscriminatorValue("SONIC")
public class Sonic extends GameCharacter {
}
@Entity
@DiscriminatorValue("MARIO")
public class Mario extends GameCharacter {
}
Given this query to subclass, it should include the folder by type, for example:
template.select(Mario.class).stream().forEach(System.out::println);
//should return only Mario instances
Changes
Context
Given entities:
Given this query to subclass, it should include the folder by type, for example: