[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:
Rob Bygrave
2023-02-28 23:02:19 +13:00
parent ac3ca8113d
commit 0bb2f104a4
9 changed files with 92 additions and 24 deletions
@@ -2,15 +2,22 @@ package org.example.domain;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
@Inheritance
@DiscriminatorValue("CAT")
@Entity
public class ACat extends Animal {
private String catProp;
public ACat(String name) {
super(name);
}
public String getCatProp() {
return catProp;
}
public void setCatProp(String catProp) {
this.catProp = catProp;
}
}