'Does redis internally creates a set for a hash key type?

I am storing employees as a hash in redis with hash key as com.foo.company.employee:1233. Also, I am using Spring-data-redis repository and doing findById().

When i used MONITOR to log the redis queries in my redis cluster master, I found DEL, HMSET and SADD corresponding to my find. PFB the details of my monitor output:

"DEL" "com.foo.company.employee:1233"
"HMSET" "com.foo.company.employee:1233" "id" "1233" "name" "ABC"
"SADD" "com.foo.company.employee" "1233"

This is my Employee Object

package com.foo.company;

import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;


@RedisHash
public class Employee{

@Id
private String id;
private String name;
} 

I am not able to figure why it is first doing a DEL for my find. Also, why is a set created internally for key types. Unable to figure out this both in Redis official documentation and spring-data-redis documentations.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source