eclipse / jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Other
229 stars 72 forks source link

Enhance inheritance queries at Mapper #474

Closed otaviojava closed 7 months ago

otaviojava commented 7 months ago

Changes

Context

Given entities:

@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