rfink / sequelize-redis-cache

Small fluent interface for caching sequelize database query results in redis more easily
MIT License
174 stars 47 forks source link

What about associations ? #11

Closed jeremyputeaux closed 8 years ago

jeremyputeaux commented 8 years ago

Hello, I'm trying to had your lib to my project but i'm facing problem with my differents associations: http://docs.sequelizejs.com/en/latest/api/associations/

I only get {"status":500,"error":{"code":"MODULE_NOT_FOUND"}}

Is this an issue or am I doing something wrong ?

rfink commented 8 years ago

Can you make a plunkr (or similar) to demo the problem? It was designed to work correctly with associations. MODULE_NOT_FOUND makes me think you may be missing a dependency.

jeremyputeaux commented 8 years ago

Of course. Hope I forgot nothing and this helps. https://plnkr.co/edit/bXE9xZYps6LhI11a8ejm

rfink commented 8 years ago

Thanks. Can you also drop in your package.json?

jeremyputeaux commented 8 years ago

I've edited the plunkr. Thanks for your help.

rfink commented 8 years ago

Thanks. I'm going to try to look at this within a few days. I know some other issues have been raised around this module and Postgres, I may very well be missing something.

jeremyputeaux commented 8 years ago

Alright! Thanks for the investigations!

rfink commented 8 years ago

No problem, thanks for using the module!

rfink commented 8 years ago

So I'm having some trouble with your plunkr, some syntax errors and such. But I poked around a bit anyway, trying to see what I could find. Can you try to add "pg-native" to your dependencies and npm install again? A previous issue seem to have been resolve by adding this module, even though it doesn't seem to be otherwise required. If it works, I'll add it as a requirement to the README.md, and then after some investigation, if it's required, I'll add it to peerDependencies.

rfink commented 8 years ago

Going to close due to inactivity, please reopen if you encounter the issue after adding pg-native.