Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-18-2021 04:09 AM
Hi,
i am trying to replace the @Depth annotation above repository methods.
I have this class, and it looks like it has a lot of objects in its fields which are LinkedList-s.
How should i replace for example the easiest repo method :
should i write a custom query?If so could you help me with that?
@Depth(4)
Optional<Upload> findById(String id);
This is the upload class:
@Node
public class Upload
{
private boolean analyseFinished;
private long createdAt = System.currentTimeMillis();
private boolean fieldAssignmentFinished;
private List<Header> headers = new LinkedList<>();
@Id
@GeneratedValue(generatorClass = UUIDStringGenerator.class)
private String id;
private String name;
private long numberOfAddresses;
private List<String> personIds = new LinkedList<>();
@JsonIgnore
private List<UploadElement> uploadElements = new LinkedList<>();
}
Thanks,
Daniel
02-22-2021 01:16 AM
I think a custom query is your best bet.
Your Upload
seem to be missing a few annotations (on headers
at least, and maybe on personIds
). Can you share what the schema roughly is before we can help with the custom query?
All the sessions of the conference are now available online