cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Replacing @Depth SDN6

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

1 REPLY 1

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?

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online