Slackbot
09/19/2019, 2:53 PMthanksforallthefish
09/19/2019, 3:04 PMAbstractResourceAssemblerSupport
is (I see you are using spring-hateaos 0.25.0, in 0.25.2 there is a class called ResourceAssemblerSupport
which seems to do the same), but probably you can override the instantiateResource
method in your assemblerthanksforallthefish
09/19/2019, 3:05 PMthanksforallthefish
09/19/2019, 3:05 PMSandy
09/19/2019, 3:10 PMSandy
09/19/2019, 3:11 PMSandy
09/19/2019, 3:11 PMthanksforallthefish
09/19/2019, 3:13 PMinstantiateResource
calling your constructor directly in PaymentDetailAssembler
thanksforallthefish
09/19/2019, 3:13 PMSandy
09/19/2019, 3:14 PMSandy
09/19/2019, 3:14 PMSandy
09/19/2019, 4:13 PMSandy
09/19/2019, 4:19 PMoverride fun instantiateResource(entity: PaymentDetailDao): PaymentDetail {
return PaymentDetail(externalPaymentId = -1)
}
Sandy
09/19/2019, 4:20 PMSandy
09/19/2019, 4:20 PMthanksforallthefish
09/19/2019, 4:31 PMreturn PaymentDetail(externalPaymentId = entity.externalId)
. if all fields are nullable you have to fallback to defaults though.Sandy
09/19/2019, 4:42 PM