'Need a direct way of implementing Azure spring data cosmos db query implementation for a nested parameter
Say for example an object in cosmosDb looks like this:-
{
att1: val1,
att2: val2,
att3: {
att4: val4,
att5: val5
}
att6: val6
}
Is there any way of making azure search with 'att4'?
Solution 1:[1]
We can create using query methods via the following syntax, and calling it in your implementation class by passing the att4
value by which you are trying to retrieve the data"0
@Repository
interface myRetrieveMethod extends CosmosRepository<DBObject, String> {
List<DBObject> getAllByAtt3_Att4AndAtt3(String att4Value);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jeremy Caney |