loopbackio / loopback-connector-redis

EXPERIMENTAL: Redis connector for LoopBack.
http://loopback.io/doc/en/lb2/Redis-connector.html
Other
36 stars 46 forks source link

Docs #16

Closed mariohmol closed 8 years ago

mariohmol commented 8 years ago

Hi,

I really could not get how this connector works. There istn a doc explaining how to use or in tests the example is not something that can be used in the real world.

The thing is, in redis we need to have a key to find or store a value. So it should have something like:

If we take the tests it saves the key and value in same string, and to find this results it uses a generated ID

If I use a filter like the example, It return a empty result.

I could see that it is saving in redis:

1) "id:RedisModel" 7) "i:RedisModel:name:veiculosmotos" 8) "RedisModel:2" 9) "RedisModel:1" 10) "RedisModel:4" 11) "RedisModel:3" 12) "s:RedisModel"

superkhau commented 8 years ago

I believe your use case is more of a key-value store scenario. We have another connector that allows straightforward get/set operations -- see https://github.com/strongloop/loopback-connector-kv-redis. @crandmck We probably need some distinction between the persisted model style redis connector vs the key-value style in the docs.

superkhau commented 8 years ago

Gonna close this as resolved. Please feel free to ping me/reopen this issue if you want to revisit this issue.