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
Hi, following good practice from contributors i enabled sof-deleting for order entity. Now when i add a new order "Place Order" it fail because constrain in data base.
Order has field order_number and it is unique, it is generated by OrderNumberGenerator in SalesBundle/Generator.
While it generate the number it call getLastOrderNumber that use findBy and is enable sof-deleting so it generate existing order number.
To solve this in Order Repository on CoreBundle y create method to return last order but now softdeleting is disable, and change on classs OrderNumberGenerator method getLastOrderNumber to use my new method.
I hope this help you, and please suggest other solution more elegant.
Thanks
Carlos.
Hi, following good practice from contributors i enabled sof-deleting for order entity. Now when i add a new order "Place Order" it fail because constrain in data base.
Order has field order_number and it is unique, it is generated by OrderNumberGenerator in SalesBundle/Generator.
While it generate the number it call getLastOrderNumber that use findBy and is enable sof-deleting so it generate existing order number.
To solve this in Order Repository on CoreBundle y create method to return last order but now softdeleting is disable, and change on classs OrderNumberGenerator method getLastOrderNumber to use my new method.
I hope this help you, and please suggest other solution more elegant.
Thanks
Carlos.
The text was updated successfully, but these errors were encountered: