mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
[QueryBeans] Fix for missing inherited properties when parent only has @DiscriminatorValue
A parent in the Inheritance hierarchy has @DiscriminatorValue but not the @Inheritance annotation. The bug means the inherited properties are not included on the generated query bean. The fix is to the querybean-generator to pick up inherited properties for this case.
This commit is contained in:
@@ -591,25 +591,7 @@ public class QCustomerTest {
|
||||
.findList();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void query_setInheritType() {
|
||||
|
||||
ACat cat = new ACat("C1");
|
||||
cat.save();
|
||||
|
||||
ACat cat2 = new ACat("C2");
|
||||
cat2.save();
|
||||
|
||||
ADog dog = new ADog("D1", "D878");
|
||||
dog.save();
|
||||
|
||||
List<Animal> animals = new QAnimal()
|
||||
.id.greaterOrEqualTo(1L)
|
||||
.setInheritType(ACat.class)
|
||||
.findList();
|
||||
|
||||
System.out.println(animals);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void select_assocManyToOne() {
|
||||
|
||||
Reference in New Issue
Block a user