Node-redis: Deprecation notice using HMSET with object

Created on 6 Jun 2016  路  2Comments  路  Source: NodeRedis/node-redis

  • Version: node v4.4.5, node_redis v2.5.3.
  • Platform: Docker container based on Alpine linux
  • Description:

Calling HMSET with an object as an argument, I get the following

node_redis: Deprecated: The HMSET command contains a argument of type Object.
This is converted to "[object Object]" by using .toString() now and will return an error from v.3.0 on.
Please handle this in your code to make sure everything works as you intended it to.

Is this accurate?

question

Most helpful comment

@jbergknoff hmset still accepts an object as second argument like in: client.hmset('key', {field: 'value'}[, callback]). If you have a nested object, this was always converted to [object Object] but without any notice. So the only thing that changed is the added warning.

All 2 comments

@jbergknoff hmset still accepts an object as second argument like in: client.hmset('key', {field: 'value'}[, callback]). If you have a nested object, this was always converted to [object Object] but without any notice. So the only thing that changed is the added warning.

Thanks, I see what you mean now.

Was this page helpful?
0 / 5 - 0 ratings