Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.
This repository was archived by the owner on May 3, 2021. It is now read-only.

Bidirectional relationships lead to a stack overflow error in the Cypher generator. #111

@michael-simons

Description

@michael-simons

The following mapping:

import java.util.HashSet;
import java.util.Set;

import org.neo4j.springframework.data.core.schema.GeneratedValue;
import org.neo4j.springframework.data.core.schema.Id;
import org.neo4j.springframework.data.core.schema.Node;
import org.neo4j.springframework.data.core.schema.Relationship;

@Node
public class UserEntity {

	@Id @GeneratedValue
	private Long id;

	@Relationship("HAS_PERSISTENT_TOKEN")
	private Set<TokenEntity> persistentTokens = new HashSet<>();
}

@Node
public class TokenEntity {

	@Id @GeneratedValue
	private Long id;

	private UserEntity user;
}

Will cause a stack overflow exception in org.neo4j.springframework.data.core.schema.CypherGenerator#generateListsOf starting here org.neo4j.springframework.data.core.schema.CypherGenerator#projectAllPropertiesAndRelationships.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions