neo4j-ogm

Why is findOne(<id>, <depth>) getting unacceptably slow performance when adding more nodes of the same label?

寵の児 提交于 2021-02-11 13:01:44
问题 CONTEXT I've been developing a spring boot website backed by a Neo4j database. It is designed to work as a university course search system. (the relevant structure is that courses have modulesets, that have modules, that are related to subjects, etc...) @JsonIdentityInfo(generator=JSOGGenerator.class) public class Course extends DomainObject { @NotNull private String name; @NotNull private String courseCode; private String description; private School school; @Convert(AttendanceTypeConverter

Neo4j - Custom converter for field of type List

巧了我就是萌 提交于 2021-01-06 03:35:14
问题 I am trying to write a custom converter for a nested object so that this object gets saved as string in Neo4j database. I am using @Convert annotation on my field and passing ImageConverter.class which is my AttributeConverter class. Everything works fine as expected and I am able to save string representation of Image class in Neo4j db. However, now instead of single image I want to have List<Image> as my nested field. In this case, putting @Convert(ImageConverter.class) doesn't work. I see

Neo4j - Custom converter for field of type List

≡放荡痞女 提交于 2021-01-06 03:31:32
问题 I am trying to write a custom converter for a nested object so that this object gets saved as string in Neo4j database. I am using @Convert annotation on my field and passing ImageConverter.class which is my AttributeConverter class. Everything works fine as expected and I am able to save string representation of Image class in Neo4j db. However, now instead of single image I want to have List<Image> as my nested field. In this case, putting @Convert(ImageConverter.class) doesn't work. I see

Neo4j - Custom converter for field of type List

你离开我真会死。 提交于 2021-01-06 03:31:02
问题 I am trying to write a custom converter for a nested object so that this object gets saved as string in Neo4j database. I am using @Convert annotation on my field and passing ImageConverter.class which is my AttributeConverter class. Everything works fine as expected and I am able to save string representation of Image class in Neo4j db. However, now instead of single image I want to have List<Image> as my nested field. In this case, putting @Convert(ImageConverter.class) doesn't work. I see

custom propertyConverter in filter is getting overridden in Neo4j OGM

↘锁芯ラ 提交于 2020-03-05 03:06:08
问题 I am manually setting propertyConverter of a filter in Neo4j OGM. filter.setPropertyConverter(new EnumArrayStringConverter(VendorCostStatus.class)); filters.add(filter); But then when I call session.loadAll(DomainClass. class , filters), it is picked by LoadByTypeDelegate.loadAll(Class<T> type, Filters filters) But then LoadByTypeDelegate overrides the propertyConverter of the filter by calling resolvePropertyAnnotations(Class entityType, Iterable<Filter> filters) and sets the default

Map arbitrary relations via Neo4j OGM

眉间皱痕 提交于 2020-01-24 16:27:05
问题 Neo4j OGM supports arbitrary node properties being mapped to entity classes via @Convert and CompositeAttributeConverter but what about the relation part? How would I map arbitrary relations in a @NodeEntity ? The actual properties and relations being used in my data model are configurable, i.e. they are not known at compile time. Example: Configuration specifies nodes of label A and B and a relation from A to B named REL_1. Now when I am querying nodes of label A then I would like to

neo4j in JEE (JBoss) environment:

丶灬走出姿态 提交于 2020-01-06 04:29:10
问题 I have built a RESTful web service for Wildfly using Neo4j OGM, but when I access it I get a NullPointerException . It seems that a Map that should be populated with my model classes has not been initialized by the time it is accessed. Why is this happening? Upfront I have to say that this module, salessupport-ui , is currently implemented as a fat client using javafx and it works fine connecting to the neo4j community edition 2.2.4, reading, writing, no problem. What I would like to do now

Spring Data Neo4j - Argument Type Mismatch

北城余情 提交于 2020-01-04 05:41:13
问题 I used Neo4j 3.0.6, neo4j-ogm 2.0.5, Spring boot starter 1.4.1 RELEASE, Lucene 5.5.2 This is my Machine and machineSectionSummary class (I only post the field, actually there are properties and constructors). When I call updateMachineSectionSummary function, after call this function and relaunch the program, I can't call machineRepository.findByName and get the error below. How can I fix this? I already tried to remove the Date, changing the relationship name, but its not working @NodeEntity

Neo4j SDN4 entity inheritance and indexes

纵饮孤独 提交于 2019-12-25 01:35:30
问题 I have a following Cypher query: PROFILE MATCH (childD:Decision) WITH childD ORDER BY childD.createDate DESC SKIP 0 LIMIT 10 MATCH (childD:Decision)-[ru:CREATED_BY]->(u:User) OPTIONAL MATCH (childD:Decision)-[rup:UPDATED_BY]->(up:User) RETURN ru, u, rup, up, childD AS decision, [ (childD)-[rdt:BELONGS_TO]->(t:Tag) | t ] AS tags Right now on my Neo4j database (~23k Decision nodes) this query works ~50 ms and I don't understand or it uses index on childD.createDate field. This is PROFILE output

Spring Data Neo4j 5 update dynamic properties

大兔子大兔子 提交于 2019-12-24 09:05:55
问题 I have the following entity: @NodeEntity public class Value { @Properties(prefix = "property", allowCast = true) private Map<String, Object> properties; } I have added the following properties: Map<String, Object> properties1 = new HashMap<>(); properties.put("key1", "one"); properties.put("key2", "two"); value.setProperties(properties1); Right now on the database level, I have the Value node with two properties: property.key1 = "one" property.key2 = "two" Now, I'd like to update the