Is this possible to create subView over @Mapping("this") with constructor? Let's say I have such View:
@EntityView(Validation.class)
public interface ValidationView extends IValidation {
@Override
@Mapping("this")
TimePeriodForValidation getPeriod();
@EntityView(Validation.class)
abstract class TimePeriodForValidation extends TimePeriodView {
public TimePeriodForValidation(
@Mapping("startTime") LocalDateTime startTime,
@Mapping("endTime") LocalDateTime endTime
) {
super(startTime, endTime);
}
}
}
With com.blazebit:blaze-persistence-integration-quarkus-3 it gives me a RuntimeException: "Probably we did something wrong, please contact us if you see this message." which is caused by compile error (at runtime), when it tries to call constructor of TimePeriodForValidation with strange paramters: TimePeriodForValidation_$$javassist_entityview and Map. TimePeriodForValidation_$$javassist_entityview is probably derived from TimePeriodForValidation
NB. startTime and endTime are fields of Validation.class
Does anybody know why does this happen? Seems like it only happens when ConstructorKind is ProxyFactory.ConstructorKind.CREATE
I've created issue on Github
Is this possible to create subView over @Mapping("this") with constructor? Let's say I have such View:
@EntityView(Validation.class)
public interface ValidationView extends IValidation {
@Override
@Mapping("this")
TimePeriodForValidation getPeriod();
@EntityView(Validation.class)
abstract class TimePeriodForValidation extends TimePeriodView {
public TimePeriodForValidation(
@Mapping("startTime") LocalDateTime startTime,
@Mapping("endTime") LocalDateTime endTime
) {
super(startTime, endTime);
}
}
}
With com.blazebit:blaze-persistence-integration-quarkus-3 it gives me a RuntimeException: "Probably we did something wrong, please contact us if you see this message." which is caused by compile error (at runtime), when it tries to call constructor of TimePeriodForValidation with strange paramters: TimePeriodForValidation_$$javassist_entityview and Map. TimePeriodForValidation_$$javassist_entityview is probably derived from TimePeriodForValidation
NB. startTime and endTime are fields of Validation.class
Does anybody know why does this happen? Seems like it only happens when ConstructorKind is ProxyFactory.ConstructorKind.CREATE
I've created issue on Github
Share Improve this question edited Feb 11 at 12:11 Anton Astafiev asked Feb 10 at 20:03 Anton AstafievAnton Astafiev 1267 bronze badges1 Answer
Reset to default 1It would be great if you could create a bug report on the GitHub issues list for this error, as I don't think this should happen. Having said that, you should be able to workaround the problem by defining a named constructor e.g. create
with no arguments, like this:
@ViewConstructor("create")
public TimePeriodForValidation() {
super(null, null);
}