Skip to content

Use of arrayFilters in @Update in mongo repository #4705

Open
@andersonfaria-hotmart

Description

@andersonfaria-hotmart

It'd be nice to execute all update options in update repositories like:

@Query("{}")
@Update("{${'$'}set: {'productDetails.${'$'}[elem].isExcluded': false}}, {arrayFilters: [{'elem.id': ?0}]}")
suspend fun deleteProductDetailById(productId: String): Int

But mongo repositories seems to not recognize arrayFilters.

Activity

christophstrobl

christophstrobl commented on May 23, 2024

@christophstrobl
Member

Thank you @andersonfaria-hotmart for bringing this up - would be a nice enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Use of arrayFilters in @Update in mongo repository · Issue #4705 · spring-projects/spring-data-mongodb