Code Monkey home page Code Monkey logo

Comments (8)

enumag avatar enumag commented on May 26, 2024 1

Hmm... yes, this does look like something caused by #45. I'll have a closer look tomorrow.

from uuid-doctrine.

enumag avatar enumag commented on May 26, 2024 1

I don't think it's possible to fix this issue. However after inspecting the internals of doctrine/dbal I don't think it's worth fixing.

The main problem is in the readme of this package. I'm rather new to UUIDs so I believed that the documentation was correct which it isn't. It says that UuidType uses CHAR(36) (and that's obviously bad for indexing so binary type seems better at first glance). This is true for MySQL and MariaDB. However for PostgreSQL this is incorrect. UuidType will use the internal UUID datatype on PostgreSQL and it's probably safe to assume that this type could easily be even faster for indexing uuids than bytea. It should be noted that UuidBinaryType is a MySQL/MariaDB specific optimization and that UuidType is just fine for PostgreSQL.

from uuid-doctrine.

ramsey avatar ramsey commented on May 26, 2024

Which type are you using? UuidBinaryType or UuidBinaryOrderedTimeType?

@enumag, can you look into this? Is this possibly a result of the changes in #45? I might roll a hotfix soon that reverts those changes until I can find a resolution for this.

Thanks!

from uuid-doctrine.

forgie1 avatar forgie1 commented on May 26, 2024

Thank you for reply

I use Ramsey\Uuid\Doctrine\UuidBinaryType::class bytes got by Ramsey\Uuid::uuid1()->getBytes().

from uuid-doctrine.

ramsey avatar ramsey commented on May 26, 2024

I've reverted #45 in release 1.4.3. @forgie1, please try 1.4.3 and let me know if that fixes the problem you were facing.

from uuid-doctrine.

forgie1 avatar forgie1 commented on May 26, 2024

I have used before in composer:

"conflict": {
    "ramsey/uuid-doctrine": "1.4.2"
}

Both 1.4.1 and now 1.4.3 don't throw this notice.

from uuid-doctrine.

flaushi avatar flaushi commented on May 26, 2024

@enumag , is this still true as of today (I expect yes)?
I am deploying my project to PostgreSQL and MySQL databases and would like to have one type that is good for all database systems. Can you recommend one to me?

from uuid-doctrine.

enumag avatar enumag commented on May 26, 2024

@flaushi Sorry, I'm only using PostgreSQL so I don't know what is best when using both MySQL and PostgreSQL. I would not recommend it.

from uuid-doctrine.

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.