Closed skrosoft closed 5 years ago
Hello,
I have a problem with the defaultProvider that doesnt work on sub-class @attribute({defaultProvider: () => 200})
@attribute({defaultProvider: () => 200})
Here is my code. I could be a bug, right?
import ... from '@aws/dynamodb-data-mapper-annotations'; @table('payment_service_provider') export class PaymentServiceProvider { @autoGeneratedHashKey() id: string; ... @attribute() apiEndpoints?: PaymentServiceProviderApiEndpoints; ... } class PaymentServiceProviderApiEndpoints{ leadsCreate: ApiEndpoint; } class ApiEndpoint{ @attribute() url: string; @attribute({defaultProvider: () => 200}) expectedStatusCode: number; }
Vincent
It seems it was because embed() was missing:
embed()
@attribute({memberType: embed(PaymentServiceProviderApiEndpoints)})
Hello,
I have a problem with the defaultProvider that doesnt work on sub-class
@attribute({defaultProvider: () => 200})
Here is my code. I could be a bug, right?
Vincent