- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Remove or Optimize the OrderItem entity #1981
Comments
Sounds like a good plan to get rid of the OrderItem entity. Not sure how other ecommerce frameworks handle this...
How will we solve this? We can still have rounding differences with large quantities I think, even after this has been implemented?
This is only an internal relation used for creating the StockMovements right? It shouldn't be to complicate to construct stock movements based on orderlines (famous last words)? In my plugins I really only use the variant that's related to the stockMovement. |
Good plan on getting rid of the OrderItem entity. Migrations could include counting the OrderItems that match the specific data model and adding the count for that model. In either case it seems that it would considerably improve efficiency going forward. |
Sound's good to me. |
Relates to #1981. All core e2e tests are passing as of this commit. Still need to fix Admin UI and any broken plugin tests
Relates to #1981. All core e2e tests are passing as of this commit. Still need to fix Admin UI and any broken plugin tests
Here is a simplified diagram of the current data model for Orders:
In each
OrderLine
, a newOrderItem
entity is created in an amount corresponding to thequantity
of that line. There are a few reasons we do it like this:0
while leaving the other one as is.Problems
There are a few issues with the current model, all of which come down to computational & storage efficiency:
Proposal
I would like to explore how we can altogether remove the OrderItem entity from the Vendure data model.
The high-level tasks are:
I suspect that this change can have a very significant impact on the speed and efficiency of Vendure as a whole. I'm happy to hear your feedback!
The text was updated successfully, but these errors were encountered: