Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6254403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:10:25+00:00 2026-05-24T14:10:25+00:00

I have a document with a structure like this: Product (root) Document1 (embedded) Document2

  • 0

I have a document with a structure like this:

Product (root)
   Document1 (embedded)
   Document2
   ...
   DocumentN
      Part1  (embedded)
      Part2
      ...
      PartN

I have POCOs mapped to the structure. At one point, user creates a Product, which is the saved to the database immeadetly. The user then creates a document, after which the Product entity is saved again to the database (as I understand, it should do an update as the product entity already exists in db). However, when I create a N-th document inside a product and try to save it, I get an error that I’m trying to upload too much (maximum upload size limit is 16MB).

How can I update the Product document so that I would insert (upload) only the new Document into the Product instead of uploading the whole product to the database again ?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:10:25+00:00Added an answer on May 24, 2026 at 2:10 pm

    You need to use upserts. You do this via an update and specifying that it should be an upsert. This will allow you to set/update specific properties without specifying the entire object.

    Assuming your products have a productId field which you’ll use to identify which product to update:

    db.products.update( { "productId":1234 }, { $set: { document1: { part1: "foo" } } }, true );
    

    The last param (true) indicates that this is an upsert. Your driver may have a slightly different way of indicating the upsert.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML document with a basic structure like this: <?xml version=1.0 encoding=UTF-8
If I have a table structure like this: Transaction [TransID, ...] Document [DocID, TransID,
I have a document structure in Solr that looks something like this (irrelevant fields
I have an XML structure like the following: <Root> <Base> <Greeting>Base Hello!</Greeting> <SpecialMessage>Base Special
I have a structure like this: <ul id="mycustomid"> <li><a>Item A</a> <ul class="children"> <li><a>Child1 of
So for example I have a structure like this: Javascript function toggle(id){ var element
Scenario: I have a document I created using LaTeX (my resume in this case),
A have the document with 23 figures and 46 tables (appendix to journal article).
I have a document and want to create it as a twocolumn-document. That works
I have a document with headings and unordered lists. How can I use JQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.