Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Doctrine 2
Doctrine 2

168
122
+ 1
24
Mongoose
Mongoose

781
597
+ 1
38
Add tool

Doctrine 2 vs Mongoose: What are the differences?

Developers describe Doctrine 2 as "An object-relational mapper (ORM) for PHP 5.3.2+ that provides transparent persistence for PHP objects". Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. On the other hand, Mongoose is detailed as "MongoDB object modeling designed to work in an asynchronous environment". Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

Doctrine 2 belongs to "Object Relational Mapper (ORM)" category of the tech stack, while Mongoose can be primarily classified under "Object Document Mapper (ODM)".

"Great abstraction, easy to use, good docs" is the primary reason why developers consider Doctrine 2 over the competitors, whereas "Well documented" was stated as the key factor in picking Mongoose.

Mongoose is an open source tool with 19K GitHub stars and 2.63K GitHub forks. Here's a link to Mongoose's open source repository on GitHub.

PedidosYa, WebbyLab, and triGo GmbH are some of the popular companies that use Mongoose, whereas Doctrine 2 is used by Vend, LinkORB, and zombakka. Mongoose has a broader approval, being mentioned in 88 company stacks & 92 developers stacks; compared to Doctrine 2, which is listed in 35 company stacks and 12 developer stacks.

- No public GitHub repository available -

What is Doctrine 2?

Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL.

What is Mongoose?

Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Doctrine 2?
Why do developers choose Mongoose?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use Doctrine 2?
    What companies use Mongoose?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Doctrine 2?
    What tools integrate with Mongoose?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Doctrine 2 and Mongoose?
    Propel
    Propel provides a GPU-backed numpy-like infrastructure for scientific computing in JavaScript.
    Hibernate
    Hibernate is a suite of open source projects around domain models. The flagship project is Hibernate ORM, the Object Relational Mapper.
    Sequelize
    Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and more.
    SQLAlchemy
    SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
    Entity Framework
    It is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write.
    See all alternatives
    Decisions about Doctrine 2 and Mongoose
    No stack decisions found
    Interest over time
    Reviews of Doctrine 2 and Mongoose
    Review ofMongooseMongoose

    I inherited a stack where Mongoose is used in the database layer.

    It's been several months and it's still the single highest source of daily WT*s in my backend development. The API is full of irregularities and the design is a poor mix of object-orientation and stateful objects with a lot implicit behavior. Mongoose made the choices of taking the worst parts of ORMs and using them in a context where the benefits of ORMs don't apply. The only reason I'm keeping it is its handy .populate() feature. Expect bad surprises!

    How developers use Doctrine 2 and Mongoose
    Avatar of AyeDeals
    AyeDeals uses MongooseMongoose

    We use mongoose and node-native for database querying.

    Avatar of Itbid
    Itbid uses Doctrine 2Doctrine 2

    ORM Layer para acceso a datos en la aplicaci贸n ITBID

    Avatar of anthillsolutions
    anthillsolutions uses MongooseMongoose

    No-brainer for accessing Objects with NodeJS.

    How much does Doctrine 2 cost?
    How much does Mongoose cost?
    Pricing unavailable
    Pricing unavailable
    News about Doctrine 2
    More news