我正在使用spring数据neo4j 4.我成功存储了对象。但是当我从neo4j中检索对象时,我遇到了以下异常:
代码:
@DateLong
private Date earliest;
@DateLong
private Date latest;
例外:
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at org.neo4j.ogm.typeconversion.DateLongConverter.toEntityAttribute(DateLongConverter.java:22) ~[neo4j-ogm-1.1.2.jar:na]
at org.neo4j.ogm.entityaccess.FieldWriter.write(FieldWriter.java:64) ~[neo4j-ogm-1.1.2.jar:na]
at org.neo4j.ogm.mapper.GraphEntityMapper.writeProperty(GraphEntityMapper.java:164) ~[neo4j-ogm-1.1.2.jar:na]
at org.neo4j.ogm.mapper.GraphEntityMapper.setProperties(GraphEntityMapper.java:129) ~[neo4j-ogm-1.1.2.jar:na]
at org.neo4j.ogm.mapper.GraphEntityMapper.mapNodes(GraphEntityMapper.java:110) ~[neo4j-ogm-1.1.2.jar:na]
at 4j.ogm.mapper.GraphEntityMapper.mapEntities(GraphEntityMapper.java:94) ~[neo4j-ogm-1.1.2.jar:na]