Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Sequelize vs Typeorm #252

Closed
Zeko369 opened this issue Nov 18, 2019 · 11 comments
Closed

Sequelize vs Typeorm #252

Zeko369 opened this issue Nov 18, 2019 · 11 comments
Labels
Discussion Ideas, feature requests, views on features. Anything which is a discussion. Enhancement New feature or request

Comments

@Zeko369
Copy link
Member

Zeko369 commented Nov 18, 2019

@Zeko369 I'm down to use TypeORM but we should loop @QuincyLarson into this conversation as I believe it was he who initially proposed sequelize.

Originally posted by @timmyichen in #162 (comment)

Since using TS for migrations and seeds with sequelize is a really janky experience I think that we should consider using TypeORM. If anyone has any experience using Typeorm or why we should stick with Sequelize feel free to comment here.
One great thing that we cant do with sequelize since we're using sequelize-ts for models is migrations, TypeORM can be used to automaticly generate migrations (they can sometimes be wrong, this aint Rails' ActiveRecord) but would greatly help.

@Zeko369 Zeko369 added Enhancement New feature or request question Discussion Ideas, feature requests, views on features. Anything which is a discussion. labels Nov 18, 2019
@Zeko369 Zeko369 mentioned this issue Nov 18, 2019
3 tasks
@Zeko369
Copy link
Member Author

Zeko369 commented Nov 18, 2019

Or maybe something like this Vincit/objection.js#1069 (comment)

@Zeko369
Copy link
Member Author

Zeko369 commented Nov 18, 2019

Copied from discord
The only difference that I found so far (I'm using it for a differenet project) is that you cant do this

User.create({
    username: 'janedoe',
    birthday: new Date(1980, 6, 20)
  }))

And have to do

const user = new User();
user.username = 'asd';
user.birthday = new Date();
user.save();

But we could do this typeorm/typeorm#3903, and fix that problem

@timmyichen
Copy link
Contributor

Since we're writing code that closely resembles TypeORM already, I think we can just move to that and use the linked issue above for keeping the same style.

@Zeko369
Copy link
Member Author

Zeko369 commented Nov 18, 2019

@allella
Copy link
Contributor

allella commented Nov 19, 2019

I'm fine with whatever you folks find will work. Though, I agree it would be good for Quincy and others to stamp this one.

Given the trouble Sequelize + Typescript has already caused it seems wise to consider a tool that plays well.

Sequelize was suggested by Quincy well before the technical conversations started, presumably to set a reasonable default tech stack and avoid an endless conversation about the stack.

Also, Sequelize was suggested before TypeScript was introduced.

@QuincyLarson
Copy link
Contributor

I will defer to the people building the app itself.

@Zeko369 If you think TypeORM is a better fit and you're the main person working on this at the moment, I say go ahead and get started with it.

If anyone has other opinions on this you can share those here.

@Zeko369
Copy link
Member Author

Zeko369 commented Nov 19, 2019

@freeCodeCamp/chapter-moderators Any other thoughts?

@allella
Copy link
Contributor

allella commented Nov 20, 2019

@nik-john @ceciliaconsta3 you were both referenced here and are welcome to chime in. I think everybody else on the thread has stated their opinion or deferred (Quincy and I).

@iansltx listed both TS and Sequelize in #11 and @oyewoas @hamidnoei @imccausl listed Sequelize experience, so if there's any final words on using TypeORM, instead of Sequelize, then please comment now.

@Zeko369
Copy link
Member Author

Zeko369 commented Nov 20, 2019

Tnx @allella for finding and pinging them 👍

@ceciliaconsta3
Copy link
Contributor

ceciliaconsta3 commented Nov 21, 2019

$0.02: As Quincy mentioned earlier, whoever is planning to perform the bulk of work on this should decide. Though if only a few are comfortable using said technology and if they get busy, it may be better to use something others are more familiar with to share the load. My experience using Sequelize is limited and non-existent in TypeORM.

If we just need a final decision on this going forward, I say let's use Sequelize. I created a makeshift poll in Discord if we're still uneasy picking one of the two (keyboard vs movie camera emoji)

@Zeko369
Copy link
Member Author

Zeko369 commented Nov 21, 2019

We'll be using TypeORM

@Zeko369 Zeko369 closed this as completed Nov 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Discussion Ideas, feature requests, views on features. Anything which is a discussion. Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants