Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-04-2019 01:55 AM
Hi!
I'm trying to add dynamic label on an NodeEntity, the storage was fine but when I want to access to the node I got an AmbiguousBaseClassException:
java.lang.RuntimeException: org.springframework.dao.InvalidDataAccessApiUsageException: Multiple classes found in type hierarchy that map to: [MyEntity, Imprint, OrganizationType]; nested exception is org.neo4j.ogm.exception.core.AmbiguousBaseClassException: Multiple classes found in type hierarchy that map to: [MyEntity, Imprint, OrganizationType]
at mypackage.ProfileTest.profileTest(ProfileTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
This is my entity:
@NodeEntity (label="OrganizationType")
@SuppressWarnings ("serial")
public class OrganizationType extends MyEntity{
@Id
private String organizationId;
// Possible labels are :
// "Imprint" "Library" "Bookshop" "Media" "BigEvent" "Publics" "Institution" "OtherBusiness"
@Labels
private List<String> labels = new ArrayList<>();
@Properties
private Map<String,Object> properties = new HashMap<String,Object>();
public List<String> getLabels() {
return labels;
}
public void setLabels(List<String> labels) {
this.labels = labels;
}
public void addLabel(String label) {
this.labels.add(label);
}
public Map<String, Object> getProperties() {
return properties;
}
public void setProperties(Map<String, Object> properties) {
this.properties = properties;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
}
Environment:
Did I miss something?
Solved! Go to Solution.
09-04-2019 08:02 AM
Fixed,
I had a class named Imprint, like the label putted in the labels property of the node entity.
09-04-2019 08:02 AM
Fixed,
I had a class named Imprint, like the label putted in the labels property of the node entity.
All the sessions of the conference are now available online