I'm using the Redisson Live Objects 3.13.2 and I have the following object:
@Getter@ToString@Builder@AllArgsConstructor@NoArgsConstructor@REntitypublic class ReporterObject { @RId private long id; private long rId; @RIndex @Setter private long sId; @Setter private boolean ac; @RIndex @Setter private Long parId; private int type; private Long pId; @Setter private ReporterObject parent; // can be null @Setter private int n_a = 0;}
So I have two problems:
- When I this operation(to override the current object):
liveObjectService.delete(ReporterObject.class, reporterObject.getRId());return liveObjectService.persist(reporterObject);
I sometimes get java.lang.IllegalArgumentException: This REntity already exists.
although I'm performing a deletion beforehand. I can get it even if the cache is totally empty before then.
- Sometimes after the persist operation supposedly succeed, what I receive is an empty object so when I try to get any field(for example call
ReporterObject#getParent
aNullPointerException
is being thrown and when I debug it, I see an empty object or not "fully full" object:. In this example I only have
sId
andtype
but noid
, norId
, noac
etc. As I stated, If I try togetAc()
aNullPointerException
is thrown. Of course it's not limited to this fields only. Sometimes it's other fields that are missing. Sometimes I get a fully empty object like this one:
Any ideas on what to do in this case?
Thanks!