Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-06-2019 03:08 PM
I have a use case where I'm generating a dynamic query before eventually calling session.query(...)
with it. I'm providing a parameter map to the function that has input that comes from the user. I figured this input would get automatically sanitized but it does not and I can't find anything in documentation that talks about sanitizing inputs for the parameter map.
I'm aware that there's a JDBC PreparedStatement
class that will do such a thing...but that seems like a pretty weird solution. Does OGM provide a way to sanitize parameter maps passed to Neo4jSession.query
?
06-12-2019 10:09 PM
I'd suggest using your Spring Hibernate/Jackson implementation along with model views (DTOs) to perform the necessary validation. If you then want to get it into map form to pass to cypher, the way I've done this is to define a map
method on each DTO to get the map form of the sanitized data.
All the sessions of the conference are now available online