GithubHelp home page GithubHelp logo

Comments (7)

quard8 avatar quard8 commented on June 16, 2024

same problem

from mongodb-odm.

epicwhale avatar epicwhale commented on June 16, 2024

I've figured out why this is happening. The primary identification strategy for an object is stored as the key of an array internally in their library. If this key happens to be of any other type other than string, it gives this illegal offset type error. So unless someone changes how these documents are stored internally, there's no fix for this issue.

from mongodb-odm.

herrsebi avatar herrsebi commented on June 16, 2024

im having the same issue with the "UUID" strategy. are you saying none of these strategies will work?

from mongodb-odm.

epicwhale avatar epicwhale commented on June 16, 2024

I've never tried '/** @id(strategy="UUID") */' . But I read that it is internally represented as a MongoBinData type? Going by that logic, it should not work either. Are you sure you facing the same issue?

from mongodb-odm.

herrsebi avatar herrsebi commented on June 16, 2024

After some toying around, I have to admit, it's probably not the same problem. I tried to change the strategy and read existing documents that were created with the default strategy, which lead to the same warning you mentioned in the opening post. After clearing the database, the UUID strategy worked fine.

from mongodb-odm.

jippi avatar jippi commented on June 16, 2024

Having the same issue.. has this not been addressed yet? :|

from mongodb-odm.

jwage avatar jwage commented on June 16, 2024

I don't think you can use MongoBinData as the _id. When I test manually with just mongo pecl extension it does not work either.

from mongodb-odm.

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.