Yubraj Tamang
Yubraj Tamang

Reputation: 11

Is there a @Query for azure cosmosDB? (DocumentDb)

Like we use @Query for sql driver, or jpa, what is the alternative annotation for azure cosmosDB(DocumentDb) to use in the java class? enter image description here

Upvotes: 0

Views: 1075

Answers (2)

Shreyanshi
Shreyanshi

Reputation: 146

The updated version

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-spring-data-cosmos-core</artifactId>
<version>3.0.0-beta.1</version> 
</dependency>

which was released in August 2020 does support @Query. You can find the documentation over here.

Upvotes: 0

Jay Gong
Jay Gong

Reputation: 23792

As i searched for spring-data-cosmosdb source code, it does not support @Query annotation. Please refer to below cases:

1.Is there any way to write custom or native queries in Java JPA (DocumentDbRepository) while firing a query to azure-cosmosdb?

2.@Query doesn't work in Spring Boot (JPA ) + Azure Cosmos db

Besides,you could ask the support of this feature in this feedback or contact with azure cosmos db team directly there.

Upvotes: 1

Related Questions