How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Spring Boot MongoDB returns "Parent node not found" when creating child nodes in tree structure [duplicate]

calendar_today May 27, 2026 person LESTER PAYES domain spring-boot

I am building a Spring Boot API for a tree structure that supports multiple storage implementations (memory, PostgreSQL and MongoDB ). The storage implementation is selected using properties like: properties app.storage=postgres or: app.storage=mongo API Endpoint The endpoint for creating child nodes is: POST /nodes/{parentId}/children The controller receives the parent ID as Long : @Override public NodeResponse nodesParentIdChildrenPost(Long parentId, NodeRequest nodeRequest) { Object child = persistenceService.addChild(parentId, nodeRequest.getName()); return toNodeResponse(child); } Postgre

open_in_new Read original post