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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom ORM's #1600

Closed
miguel12345 opened this issue Aug 21, 2015 · 12 comments
Closed

Add support for custom ORM's #1600

miguel12345 opened this issue Aug 21, 2015 · 12 comments

Comments

@miguel12345
Copy link

Hi,

I am currently using Sequelize as a ORM for my postgres database but I was looking for keystone for a great frontend tool to manage my data. The thing is that it seems to be completely locked in to mongo.

I know that you don't intend to support multiple backends, but is it doable (minutes/hours) to adapt keystone to a custom ORM? I know I would still need to provide data type mapping between sequelize and keystone but that would be easy. Apart from that, the ORM should only need to provide 5/6 methods (create/update/find/destroy etc), so, in theory, it shouldn't be too hard (also, mongoose/waterline/sequelize have similar interfaces), but what do you think? Has anyone managed to plug a custom ORM on keystone?

@morenoh149
Copy link
Contributor

@miguel12345 I think the main blockers is the extended use of mongoose features (populate at least). Using something like waterline would be great imo. Similar discussion was had keystonejs/keystone#838

@RyanCCollins
Copy link

Hi @morenoh149 I can work on this in the next month or so. I talked with you about this in gitter (old username was TechRapport). I have been building a fullstack keystone app for the last 8 weeks, so have some good ideas here and I have some experience with waterline.

@morenoh149
Copy link
Contributor

as long as it makes sense with this vision https://youtu.be/of2VM3Wwkxk?t=27m17s

@quitequinn
Copy link

Has any progress been made with integrating this?

@RyanCCollins
Copy link

Yes. I started working on this. I am in the reverse engineering stage. I will update when I've made some progress!

@mxstbr
Copy link
Collaborator

mxstbr commented Apr 29, 2016

Any updates here @RyanCCollins? Can we help?

@RyanCCollins
Copy link

Hey @mxstbr. Thanks for getting in touch. I have made a bit of progress, but keep getting pulled aside on other projects. I may have a few questions, specifically regarding the integration with Keystone lists when I get to that point. What's the best way to get in touch with you? Thanks!

@mxstbr
Copy link
Collaborator

mxstbr commented Apr 29, 2016

Either here directly or Twitter!

@RyanCCollins
Copy link

Hey @mxstbr I want to apologize. The timing is just not going to be right for me to help out with this anytime soon. I am waste deep in it for a while, but if its still open when I get back, I would really love to contribute.

Thanks!

@ryardley
Copy link

ryardley commented Aug 27, 2016

I was thinking about this when covering all bases and mulling over reasons I would not necessarily always recommend keystone to a client (I often do recommend it!). In the process of looking around I happened across this. No idea if it is any good or how stable it is but I thought I would link it here as food for thought if you are working on it. http://www.camintejs.com/

@quinn
Copy link

quinn commented Nov 10, 2016

@RyanCCollins have you had a chance to make any progress on this? I'd like to help if there is a work-in-progress somewhere for this. It seems that a lot of the discussion has been around whether to switch ORMs, whereas instead I think I would prefer to try to just create a shim to minimize code change to the rest of the project. e.g. this file:

https://github.com/keystonejs/keystone-demo/blob/master/models/Post.js

instead of require('keystone') at the top, you would do require('keystone/sequel') or whatever.

@gautamsi
Copy link
Member

Keystone 4 is going in maintenance mode. Expect no major change. see #4913 for details.

v5 has support for SQL databases by using Knex database adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants