Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Redis save the object with Hash Value and Id

$
0
0

I use those gradle dependencies:

implementation "org.springframework.boot:spring-boot-starter-data-jpa:2.6.6"implementation "org.springframework.boot:spring-boot-starter-data-redis:2.6.6"

Method i use to save the object:

jpaTableRepository.save(table);

My TableRepo:

@Repositorypublic interface JpaTableRepositoryextends JpaRepository<TableEntity , String>{

My TableEntity

@Data@Setter@Getter@Builder@RedisHash("Table")public class TableEntity implements Serializable{   @Id   private String identification;   //another attributes}

i can save/cache the data. But the saved key is: Table:xxxxxxx. how is it possible to save just the identification without the value of the Hash before?


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>