简体   繁体   中英

Spring data neo4j 4 Date can't cast

I am using spring data neo4j 4. I stored object successfully. But when I retrieve object from neo4j, I am getting following exception:

Code:

@DateLong
private Date earliest;
@DateLong
private Date latest;

Exception:

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]

这是neo4j-ogm 1.1.2中的错误,请使用neo4j-ogm 1.1.4版

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM