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
I downloaded the project and was trying to test the code, but when I checkout an order, it publishes on the RabbitMQ queue an erro named basket-checkout-event-handler_error, this error contains the following message:
String or binary data would be truncated in table 'OrderDb.dbo.Orders', column 'BillingAddress_ZipCode'. Truncated value: '11111'.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_OrderItems_Orders_OrderId". The conflict occurred in database "OrderDb", table "dbo.Orders", column 'Id'.
The statement has been terminated.
The statement has been terminated.
What am I doing wrong here?
The text was updated successfully, but these errors were encountered:
can you double check the max length of zip code in Services\Ordering\Ordering.Infrastructure\Data\Configurations\OrderConfiguration.cs ??
addressBuilder.Property(a => a.ZipCode)
.HasMaxLength(5)
.IsRequired();
this would probably solve the "String or binary data would be truncated in table 'OrderDb.dbo.Orders', column 'BillingAddress_ZipCode'. Truncated value: '11111'."
because it's basically saying that "11111" exceeded the max length
by this the order is not being created and while its trying to add order item it gives
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_OrderItems_Orders_OrderId". The conflict occurred in database "OrderDb", table "dbo.Orders", column 'Id'.
because that specific order doesn't exist in the database
I downloaded the project and was trying to test the code, but when I checkout an order, it publishes on the RabbitMQ queue an erro named basket-checkout-event-handler_error, this error contains the following message:
What am I doing wrong here?
The text was updated successfully, but these errors were encountered: