You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add comprehensive documentation for partial updates on @document entities (#595)
- Document the existing partial update functionality for JSON documents
- Add examples for single entity updates using Query by Example
- Include bulk update operations and ExampleMatcher usage
- Explain how JSON.SET with path specifications enables atomic field updates
- Clarify that this feature is already implemented and tested
Copy file name to clipboardExpand all lines: docs/content/modules/ROOT/pages/json-repositories.adoc
+106Lines changed: 106 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,6 +251,112 @@ public interface CompanyRepository extends RedisDocumentRepository<Company, Stri
251
251
}
252
252
----
253
253
254
+
== Partial Updates
255
+
256
+
Redis OM Spring supports partial updates on JSON documents using the Query by Example (QBE) pattern. This feature allows you to update specific fields without affecting other parts of the document, leveraging RedisJSON's JSON.SET command with path specifications.
257
+
258
+
=== Update Single Entity
259
+
260
+
Update specific fields of an existing entity:
261
+
262
+
[source,java]
263
+
----
264
+
@Service
265
+
public class CompanyService {
266
+
@Autowired
267
+
private CompanyRepository repository;
268
+
269
+
public void partialUpdate() {
270
+
// Create an update probe with only the fields to update
0 commit comments