Understanding generated queris for repositories.
I have a repository interface defined as:
Code:
package com.eml.repository;
public interface AssetRepository extends GraphRepository<Asset>
It has a method defined:
Code:
com.eml.domain.Asset getAssetByHash(String hash);
This works. I am trying to understnad the query that this actually generates, so that I can create a modifed query. I thought it should be:
Code:
@Query(
"START asset=node:Asset(hash={0}) " +
" RETURN asset "
)
com.eml.domain.Asset getAssetByHash(String hash);
but this returns nothing.
I'm not sure why it returns nothing.
Turning on debug logging for a test run, I see the default query is:
Code:
DEBUG CypherQueryEngine - Executing cypher query: START `asset`=node:`nodes`(`hash`={0}) RETURN `asset` params {0=9df01adca030c4eb0c27fc7bb0b1a4a8a26b48538a2d1b5dcc9a6ae4e05b3095}
which makes even less sense to me.
Any help appreciated.