Giter Site home page Giter Site logo

Comments (4)

Trisha-tech avatar Trisha-tech commented on August 13, 2024 1

@Trisha-tech when user deletes, then cart should be deleted, but since user and cart are different collections, we can't do this

we can have order and cart list in the user schema whenever user deletes, then his order and cart details would be deleted. From this, we can reduce the database storage, it's easy to get details without co mplex queries and we can reduce times as well. if this idea works for your application Could you please assign this work?

Hello @Subhash23jan , Go for it
All the best

from onlinebooksales.

SidharthaPaidi avatar SidharthaPaidi commented on August 13, 2024

@Trisha-tech when user deletes, then cart should be deleted, but since user and cart are different collections, we can't do this

we can have order and cart list in the user schema whenever user deletes, then his order and cart details would be deleted. From this, we can reduce the database storage, it's easy to get details without co mplex queries and we can reduce times as well. if this idea works for your application Could you please assign this work?

Hello @Subhash23jan , A single document in MongoDB is limited to 16MB. This limit may be reached if a user has a lot of orders or items in their cart, and also You will need to locate and make any necessary updates to each user document that contains an order or cart item, such as when a product's price changes which makes it more complex .

@Trisha-tech We can use this strategy if you are not concerned about these possible problems with your application.

from onlinebooksales.

Trisha-tech avatar Trisha-tech commented on August 13, 2024

@Trisha-tech when user deletes, then cart should be deleted, but since user and cart are different collections, we can't do this
we can have order and cart list in the user schema whenever user deletes, then his order and cart details would be deleted. From this, we can reduce the database storage, it's easy to get details without co mplex queries and we can reduce times as well. if this idea works for your application Could you please assign this work?

Hello @Subhash23jan , A single document in MongoDB is limited to 16MB. This limit may be reached if a user has a lot of orders or items in their cart, and also You will need to locate and make any necessary updates to each user document that contains an order or cart item, such as when a product's price changes which makes it more complex .

@Trisha-tech We can use this strategy if you are not concerned about these possible problems with your application.

Hello @SidharthaPaidi , Go for it
All the best

from onlinebooksales.

Subhash23jan avatar Subhash23jan commented on August 13, 2024

@Trisha-tech when user deletes, then cart should be deleted, but since user and cart are different collections, we can't do this

we can have order and cart list in the user schema whenever user deletes, his order and cart details would be deleted. From this, we can reduce the database storage, it's easy to get details without co mplex queries and we can reduce times as well. if this idea works for your application, Could you please assign it?

Hello @Subhash23jan , A single document in MongoDB is limited to 16MB. This limit may be reached if a user has a lot of orders or items in their cart, and you will also need to locate and make any necessary updates to each user document that contains an order or cart item, such as when a product's price changes which makes it more complex .

@Trisha-tech We can use this strategy if you are not concerned about these possible problems with your application.

@SidharthaPaidi
each order should be stored with price while saving and it will need lot of rework and i'm working on that. The user will have order id only and order collections will remain the same
currenlty i'm working on that and there are lot of improvements needed for cart as well.

from onlinebooksales.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.