Warning in Neo4j and Spring Boot

The query used a deprecated function: id.
08-01-2025 12:12:20.517 [http-nio-61082-exec-2] WARN o.s.data.neo4j.cypher.deprecation.warn - Neo.ClientNotification.Statement.FeatureDeprecationWarning: This feature is deprecated and will be removed in future versions.
UNWIND $relationships AS relationship WITH relationship MATCH (startNode:Car) WHERE startNode.carID = relationship.fromId MATCH (endNode) WHERE id(endNode) = relationship.toId MERGE (startNode)-[relProps:ON_CAR]->(endNode) RETURN id(relProps) AS elementId

why this warning , how to resolve
Im using Spring boot, Neo4jRepository

Within Neo4j 5.x the id function got deprecated in favour of the elementId function.
If you are using a generated id with the Long type, SDN will always use the id function and you can mute those warning via the logger configuration. Logging :: Spring Data Neo4j

If you are using a generated id with a generator or a custom id, you might still see those messages appear for e.g. relationship creation. This is rooted in the use of the CypherDSL and its version used by SDN that has Neo4j 4.x as the default version because there was no Neo4j 5 LTS yet. To make the CypherDSL aware that you want to use the elementId function instead of id, you have to declare a Configuration bean in your application config (Getting started :: Spring Data Neo4j):

@Bean
public Configuration configuration() {
	return Configuration.newConfig().withDialect(Dialect.NEO4J_5).build();
}

If you are not using the Long ids on entities as long-living references, you are good to go with the id and you can just ignore those warnings.

still on performing findById im getting

One of the property names in your query is not available in the database, make sure you didn't misspell it or that the label is available when you run this statement in your application (the missing property name is: carID)
08-01-2025 14:45:58.315 [http-nio-61081-exec-3] WARN  o.s.data.neo4j.cypher.unrecognized.warn - Neo.ClientNotification.Statement.UnknownLabelWarning: The provided label is not in the database.
	MATCH (car:`Car`) WHERE car.carID = $__id__ RETURN car{.name, .add, .carID __nodeLabels__: labels(car), __elementId__: elementId(car)}

This above warnings

This is the

org.springframework.data.neo4j.cypher.unrecognized

log that repeats the message from the server. Since I mentioned this: Those warnings are not generated within Spring Data Neo4j or the Java Driver, they are originating from the database itself. "We are just the messenger" here :smiley:
This means that there might be no :Car node right now in the database and because of this, there are no properties that are known to the database, or one of those properties doesn't exist yet.

but its just a warning no error there,
so how to suppress this warning aswel

You have to set the logging level to ERROR for this particular logger:

logging.level.org.springframework.data.neo4j.cypher.unrecognized=ERROR

assuming you are using the application.properties file for configuration.