获取时不工作
Message = could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract
pathToSearch = "a.b"
@Query(value = "SELECT * FROM my_class WHERE path ~ '*.:pathToSearch.*{1}'", nativeQuery = true)
List<MyClass> getAllChild(@Param("pathToSearch") String pathToSearch);
在本机 SQL 中工作,即
SELECT * FROM my_class WHERE path ~ '*.a.b.*{1}';