Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-270

A Way to Stop Auto-Conversion of id to _id for Embedded Collections

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • PHP Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      We are working on an existing application where the automatic conversion of id to _id for embedded collections is causing unexpected behavior. This creates challenges when dealing with legacy data and maintaining compatibility with our current application setup.

      Sample document

      {
        "_id": {
          "$oid": "6583b061537cb437e5104454"
        },
        "form_group": {
          "id": {
            "$oid": "64a776c2a95c541ec42b489e"
          },
          "name": "Ionyx test group",
        },
        "approver": {
          "id": {
            "$oid": "5d1d58dc911e699d594a8805"
          },
          "salutation": "Ms.",
          "name": "Lara Garcia",
          "mobile": "+6133333",
          "email": "torig@gmail.com"
        },
        "company": {
          "id": {
            "$oid": "58c71e6c911e69f758f5b961"
          },
          "name": "Jostem"
        },
        "employee": {
          "id": {
            "$oid": "6482815886119b68746756c4"
          },
          "salutation": "Ms.",
          "name": "Janee Doey",
          "mobile": "+6100000",
          "email": "test@gmail.com"
        },
      }  

            Assignee:
            Unassigned Unassigned
            Reporter:
            muhammad.memon@ionyx.com.au Muhammad Memon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None