Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MikroORM #968

Merged
merged 1 commit into from Nov 1, 2019

Conversation

@B4nan
Copy link
Contributor

B4nan commented Sep 5, 2019

TypeScript ORM, heavily inspired by doctrine, based on Data Mapper, Unit of Work and Identity Map patterns. Also works with vanilla JS.

If I should argue about differences with existing projects, TypeORM would be probably closest, but it does not implement Unit of Work and Identity Map patterns, so that is the key difference here.

repository: https://github.com/mikro-orm/mikro-orm
website/docs: https://mikro-orm.io

By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 馃枛

猬嗏瑔猬嗏瑔猬嗏瑔猬嗏瑔猬嗏瑔

TypeScript ORM, heavily inspired by doctrine, based on Data Mapper, Unit of Work and Identity Map patterns. Also works with vanilla JS.

If I should argue about differences with existing projects, TypeORM would be probably closest, but it does not implement Unit of Work and Identity Map patterns, so that is the key difference here.

repository: https://github.com/mikro-orm/mikro-orm
website/docs: https://mikro-orm.io
@sindresorhus

This comment has been minimized.

Copy link
Owner

sindresorhus commented Sep 23, 2019

If I should argue about differences with existing projects, TypeORM would be probably closest, but it does not implement Unit of Work and Identity Map patterns, so that is the key difference here.

TypeORM is clearly much popular, so you could benefit from clearly documenting in the MicroORM how it's better.

but it does not implement Unit of Work and Identity Map patterns

It's not clear to me as user what the benefit of that is. It would be helpful if your readme elaborated on that.


There are a gadzillion ORMs and all of them claims to be the best, so you need to spend more with your readme convincing me why I should choose MicroORM over some of the more established alternatives.

@B4nan

This comment has been minimized.

Copy link
Contributor Author

B4nan commented Sep 23, 2019

Yeah you are right, will need to spend some time with that. The information is there, but not in readme.

To highlight few things:

There are a gadzillion ORMs

Yet none of them are using unit of work and identity map. Pretty much all of them are active record based.

@sindresorhus

This comment has been minimized.

Copy link
Owner

sindresorhus commented Sep 23, 2019

Yet none of them are using unit of work and identity map. Pretty much all of them are active record based.

So the readme should sell me on why that is much better ;)

@B4nan

This comment has been minimized.

Copy link
Contributor Author

B4nan commented Sep 23, 2019

So the readme should sell me on why that is much better ;)

Well it allows most of those highlighted features (especially implicit transactions and comparing by identity). I do not want to say that this is better than TypeORM, it's a different approach, that I personally like more. It is also the same way how hibernate/JPA works.

I will try to improve the readme...

@lookfirst

This comment has been minimized.

Copy link

lookfirst commented Sep 23, 2019

@sindresorhus Sorry to jump in here.

After an exhaustive search, I recently discovered Mikro. Over the past week, I've had the luxury of trying out (writing code against) all the major existing ORM(ish) tools for JS/TS. Objection.js, TypeORM and Sequelize. I got so frustrated with all of them having weird edge cases, that I really dug deep into google and github searching and found Mikro.

TypeORM was the only one I could get working with a basic relational model, but honestly, it felt clunky and did not entirely work correctly. It has an issue tracker with almost 1000 open bugs and >100 PR's. TypeScript support is good, but not great. Even the 'future of TypeORM' is an open question. The project is effectively stalled and stuff isn't getting fixed.

Being an open source developer for over 20 years, Apache Member and having implemented an ORM myself 100 years ago, extensive experience with first class ORM's like EJB3 and Hibernate. As well as contributing to ORMs like Objectify. I think I have a pretty good idea of what I'm looking for. Mikro is a breath of fresh air. The fact that he understands the importance of transactions and relational models, is massive. Being the closest to H/JPA is massive.

Better yet, the developer is extremely active. Listens to feedback. Is on top of his bug queue. Is writing good documentation. Most importantly, the project has 100% test coverage. After writing code against it, it just works the way I would expect it.

I honestly believe that this project will put the rest of them out of 'business'. Please promote it widely as it deserves as much attention as it can get.

@rustamwin

This comment has been minimized.

Copy link

rustamwin commented Sep 26, 2019

It has an issue tracker with almost 1000 open bugs and >100 PR's.

Are you seriously? Are all issues bug?

@lookfirst

This comment has been minimized.

Copy link

lookfirst commented Sep 26, 2019

@rustamwin That is a label, not whether one of those 910 other open issues is a bug or not. Even still, 62 open issues with the label of bug, is a little overwhelming, no?

@B4nan

This comment has been minimized.

Copy link
Contributor Author

B4nan commented Oct 23, 2019

Added section about what is UoW and why its nice to have one:

https://github.com/mikro-orm/mikro-orm/blob/master/README.md#-unit-of-what

@sindresorhus sindresorhus merged commit 832c5d5 into sindresorhus:master Nov 1, 2019
@lookfirst

This comment has been minimized.

Copy link

lookfirst commented Nov 1, 2019

Thanks @sindresorhus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can鈥檛 perform that action at this time.