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

  • SEARCH
  • Home
  • 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 905637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:15:11+00:00 2026-05-15T16:15:11+00:00

I have a document with an embedded document in it. I have 2 forms,

  • 0

I have a document with an embedded document in it.

I have 2 forms, 1 that updates fields in document and one that updates fields in emdedded docs.

They are split into 2 forms as lots of fields in each etc and actually this is just a simple example of the structure of my app.

Everywhere else that i reference this data it makes most sense to store in one doc and not split them.

Problem is when i save say for 1 using update_attributes just the fields from form 1 get saved, then when i goto form 2 just the fields from for 2 are saved and i lose data saved in form 1.

Is there a way to skip saving an emdedded docuemnt with a callback, so i can say for example if come from form 1 ? dont update embedded doc. And if come from form 2 just save embedded doc ?

Hope this makes sense.

Any one help or advice ?
Thanks
Rick

  • 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-15T16:15:11+00:00Added an answer on May 15, 2026 at 4:15 pm

    Not sure how it’s exposed in MongoMapper, but the MongoDB operation you’re looking for is an update with $set to just set the fields you need. So if you drop down to the ruby driver it should be pretty easy to set just the fields you care about.

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

Sidebar

Related Questions

So I have an embedded document that tracks group memberships. Each embedded document has
Currently I have an address column that is an embedded document in my users
Problem: I have a 'Group' collection. Each group has an embedded document of 'Members'.
I have a Doctrine mongodb document that I have turned into a form. The
I have pdf document, for example 25 pages. How to add one blank page
I have a simple PHP script with a form that has two select fields,
I have some javascript that ends up programatically clicking on a button: document.getElementById(myButton).click(); This
I have a problem with relationships persisting in an embedded document. Here is the
We have some embedded documents that look like this: { _id : ObjectId(4e402353bc9f6ec5a6000001), first_name
I have an MVC2 application that uses forms authorization and a session timeout. I

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.