Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance inheritance queries at Mapper #474

Merged
merged 17 commits into from
Jan 27, 2024
Merged

Enhance inheritance queries at Mapper #474

merged 17 commits into from
Jan 27, 2024

Conversation

otaviojava
Copy link
Contributor

Changes

  • Enhance queries with inheritance

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

Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
@otaviojava otaviojava marked this pull request as ready for review January 27, 2024 19:06
@otaviojava otaviojava merged commit 7a07b10 into main Jan 27, 2024
3 of 4 checks passed
@otaviojava otaviojava deleted the enhance-inheritance branch January 27, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant