I have a spring boot project which is using redis as cache, I have an entity which i want to save and use named RQuestionResult:
@Data@NoArgsConstructor@AllArgsConstructor@RedisHash("questionResult")public class RQuestionResult implements Serializable { @Id private Long questionId; private Map<String, String> byProvince; private Map<Long, Map<String, Double>> byCount;}
it saves fine to redis, but when i try to access it using spring data redis repository:
public interface RQuestionResultRepository extends CrudRepository<RQuestionResult, Long> { RQuestionResult findByQuestionId(Long questionId);}
i get this error:
exception=org.springframework.data.mapping.MappingException, message=Parameter org.springframework.data.mapping.PreferredConstructor$Parameter@42146ac0 does not have a name!, stackTrace=org.springframework.data.mapping.MappingException: Parameter org.springframework.data.mapping.PreferredConstructor$Parameter@42146ac0 does not have a name!
Do you have any idea where this comes from? does it have problems deserializing the maps?