I have Link
nodes connected to other Link
nodes. I am using latest version of spring-boot-starter-data-neo4j
and Lombok
.
My Link
node is as follows:
@Node
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Link {
@Id
private String linkId;
private String name;
@Relationship(type = "IS_LINKED_TO")
public List<Linkage> linkages;
}
and my Linkage
relationship is as folows:
@RelationshipProperties
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Linkage {
@RelationshipId
private String id;
@TargetNode
private Link link;
private Integer length;
}
My repository as follows:
public interface LinkRepository extends Neo4jRepository<Link, String> {
}
When I called linkRepository.findAll()
, I got the following warning and error:
The query used a deprecated function: `id`.
org.neo4j.driver.exceptions.value.Uncoercible: Cannot coerce LIST OF ANY? to Java String
Please advise.