mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user