Closed wcoppens closed 8 years ago
Hey there, thanks very much for bringing this to my attention. I'm quite busy mid-sprint right now, but I will definitely take a look at this as soon as I'm able. Thanks again.
Hello, so I've tested a small version of this using my existing unit test. I got a complaint when running circular references, have you tried installed "pg-native" as a dependency? Without it I got a warning plus the failed test, but with it everything passes. Can you give that a shot?
Going to close due to inactivity, please reopen if you continue to have issues after adding pg-native.
There seems to be a (initial) problem when using the caching feature with the include option of sequelize.
The problem: cachekeys differ in the first requests.
Use case:
{ where: { id: 100 } }
gets cached with key abc123 (key is an example){ where: { id: 100 } }
gets queried from the database instead of getting fetched from the cache and is being stored to the cache with key abcdef123456 (key is an example){ where: { id: 100 } }
gets fetched from the cache using key abcdef123456.Steps to reproduce: I've been debugging a lot and seem to have found the issue in the deeper objects of the includes used with the query. I can only confirm this issue using Postgres, other dbs have not been tested.
You can reproduce the issue using the following test: https://gist.github.com/wcoppens/fbc6fdbe5fbb76638e43