From f4652c5280f601500cbf4beb29552c0a9d67a82a Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 4 Jul 2018 16:31:00 +0200 Subject: [PATCH] DATAREST-811 - Improved documentation mentioning @Version in ETag calculation. We now explain in detail which @Version annotation to use as it depends on which store is backing the entity. Original pull request: #295. --- src/main/asciidoc/etags-and-other-conditionals.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/asciidoc/etags-and-other-conditionals.adoc b/src/main/asciidoc/etags-and-other-conditionals.adoc index e67691b35..94334bd96 100644 --- a/src/main/asciidoc/etags-and-other-conditionals.adoc +++ b/src/main/asciidoc/etags-and-other-conditionals.adoc @@ -16,7 +16,7 @@ The http://tools.ietf.org/html/rfc7232#section-2.3[ETag header] provides a way t include::{spring-data-rest-root}/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/support/ETagUnitTests.java[tag=versioned-sample] ---- -<1> The `@javax.persistence.Version` annotation flags this field as a version marker. +<1> The `@Version` annotation (the JPA one in case you're using Spring Data JPA, the Spring Data `org.springframework.data.annotation.Version` one for all other modules) flags this field as a version marker. ==== This POJO, when served up as a REST resource by Spring Data REST, will have an `ETag` header with the value of the version field.