You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The fieldgenerator uses an incorrect field type when building the JPAStreamer metamodel. This means that comparators such as .between() and .greaterThan() are unavailable when building predicates.
Expected behavior
A field with the following definition should generate a ComparableField:
@Column(name = "length", columnDefinition = "smallint(5)")
@NotEmpty(message = "Length may not be empty", groups = {GroupA.class})
@NotNull(message = "Length may not be null", groups = {GroupA.class, GroupB.class})
@Size(min = 1, max = 300, message = "Length must be between 1 and 300 minutes characters long")
private Integer length;
Should generate:
/**
* This Field corresponds to the {@link Film} field "length".
*/
public static final ComparableField<Film, Integer> length = ComparableField.create(
Film.class,
"length",
Film::getLength,
false
);
Actual behavior*
The field generates a ReferenceField:
/**
* This Field corresponds to the {@link Film} field "length".
*/
public static final ReferenceField<Film, Integer> length = ReferenceField.create(
Film.class,
"length",
Film::getLength,
false
);
How To Reproduce
Add one of the annotations @Size, @NotNull or @NotEmpty to a JPA field.
Build tool
Maven 3.9.0
JPAStreamer version
JPAStreamer 3.0.2
JPA Provider
Hibernate 6.0.2.Final
Java Version
11.0.17
The text was updated successfully, but these errors were encountered:
The annotations are clearly disturbing how we are handling two different Integer fields:
For some reason, the annotations separate the package name java.lang from Integer. We probably just need to fix how we handle the parsing of type names.
Describe the bug
The fieldgenerator uses an incorrect field type when building the JPAStreamer metamodel. This means that comparators such as
.between()
and.greaterThan()
are unavailable when building predicates.Expected behavior
A field with the following definition should generate a
ComparableField
:Should generate:
Actual behavior*
The field generates a
ReferenceField
:How To Reproduce
Add one of the annotations
@Size
,@NotNull
or@NotEmpty
to a JPA field.Build tool
Maven 3.9.0
JPAStreamer version
JPAStreamer 3.0.2
JPA Provider
Hibernate 6.0.2.Final
Java Version
11.0.17
The text was updated successfully, but these errors were encountered: