Scalar type querybeans generics error (#2082)

* Add failing test case for generic querybeans

Types with generics arguments have not been processed correctly, they
will lose their generics. This is not critical in Java, as the language
has to be backwards compatible with Java 1.4, but will still become
highlighted as a warning in all common IDEs.

In Kotlin however, it's not a warning but a compile error.

* Fix problem with generics in scalar type arg

This fixes the issue introduced with ScalarType aware querybeans.
This commit is contained in:
Snōwball
2020-10-16 09:57:32 +13:00
committed by GitHub
parent ee73fd47d5
commit bcc8040afe
27 changed files with 427 additions and 143 deletions
@@ -5,6 +5,9 @@ import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import org.example.domain.otherpackage.GenericType;
import org.example.domain.otherpackage.GenericTypeArgument;
/**
* Address entity bean.
*/
@@ -24,8 +27,10 @@ public class Address extends BaseModel {
@ManyToOne
Country country;
GenericType<GenericTypeArgument> metadata;
/**
* Create a copy of the address. Used to provide a 'snapshot' of
* Create a copy of the address. Used to provide a 'snapshot' of
* the shippingAddress for a give order.
*/
public Address createCopy() {
@@ -36,7 +41,7 @@ public class Address extends BaseModel {
copy.setCountry(country);
return copy;
}
public String toString() {
return id + " " + line1 + " " + line2 + " " + city + " " + country;
}