import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
@Node("customer")
public class Customer {
@Id
@Property("mobnumber")
private String mobnumber;
@Id
@Property("accnumber")
private String accnumber;
when i am trying to create composite keys with two @id I am getting the following error.
org.springframework.data.mapping.MappingException: Attempt to add id property private java.lang.String com.tmo.chub.entity.Customer.accnumber but already have property private java.lang.String com.tmo.chub.entity.Customer.mobnumber registered as id. Check your mapping configuration!
How can i define composite keys in entity class for spring data neo4j ?