---
title: "Revisions and Other Features"
url: "https://docs.ravendb.net/6.2/document-extensions/revisions/revisions-and-other-features"
version: "6.2"
language: "java"
---

# Revisions and Other Features

> Client language: Java. Also available for [C#](https://docs.ravendb.net/6.2/document-extensions/revisions/revisions-and-other-features.md), [Python](https://docs.ravendb.net/6.2/document-extensions/revisions/revisions-and-other-features.python.md), [PHP](https://docs.ravendb.net/6.2/document-extensions/revisions/revisions-and-other-features.php.md), [Node.js](https://docs.ravendb.net/6.2/document-extensions/revisions/revisions-and-other-features.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

When the revisions feature is enabled, a snapshot of a document that holds *Counters* will include in its metadata a `@counters-snapshot` property,
that holds all the document's counter names **and values** (at the time of the revision creation).  
This can be useful when historic records of the documents and their counter values are needed.

> **Info:** How do counter operations affect revision creation {#how-do-counter-operations-affect-revision-creation}
>
> Creation of a new counter and deletion of a counter modify the parent document (documents hold
> their counter names in the metadata) and will trigger a revision creation.  
> Incrementing an existing counter does not modify the parent document and will not trigger a revision creation.

## Example

```java
List<MetadataAsDictionary> orderRevisionsMetadata = session.advanced()
  .revisions()
  .getMetadataFor("orders/1-A", 0, 10);

List<MetadataAsDictionary> orderCountersSnapshots = orderRevisionsMetadata
  .stream()
  .filter(x -> x.containsKey("@counters-snapshot"))
  .map(x -> (MetadataAsDictionary) x.get("@counters-snapshot"))
  .collect(Collectors.toList());
```

## See also

- [Document Revisions Overview](https://docs.ravendb.net/6.2/document-extensions/revisions/overview.md)
- [Revert Revisions](https://docs.ravendb.net/6.2/document-extensions/revisions/revert-documents-to-revisions/revert-documents-to-specific-time.md)
- [Counters: Overview](https://docs.ravendb.net/6.2/document-extensions/counters/overview.java.md)
- [Time Series: Overview](https://docs.ravendb.net/6.2/document-extensions/timeseries/overview.md)
- [Attachments: What are Attachments](https://docs.ravendb.net/6.2/document-extensions/attachments/what-are-attachments.java.md)
- [Revisions: API Overview](https://docs.ravendb.net/6.2/document-extensions/revisions/client-api/overview.java.md)
- [Operations: Configuring Revisions](https://docs.ravendb.net/6.2/document-extensions/revisions/client-api/operations/configure-revisions.java.md)
- [Session: Loading Revisions](https://docs.ravendb.net/6.2/document-extensions/revisions/client-api/session/loading.java.md)
- [Settings: Document Revisions](https://docs.ravendb.net/6.2/studio/database/settings/document-revisions.md)
- [Document Extensions: Revisions](https://docs.ravendb.net/6.2/studio/database/settings/document-revisions.md)
- [What Are Data Subscriptions](https://docs.ravendb.net/6.2/client-api/data-subscriptions/what-are-data-subscriptions.java.md)
- [Revisions and Data Subscriptions](https://docs.ravendb.net/6.2/client-api/data-subscriptions/advanced-topics/subscription-with-revisioning.java.md)
