Skip to main content

[jpa-spec issues] [JIRA] Created: (JPA_SPEC-74) Obtaining @Version value

  • From: "mkarg (JIRA)" < >
  • To:
  • Subject: [jpa-spec issues] [JIRA] Created: (JPA_SPEC-74) Obtaining @Version value
  • Date: Mon, 17 Feb 2014 19:21:49 +0000 (UTC)
  • Auto-submitted: auto-generated

Obtaining @Version value
------------------------

                 Key: JPA_SPEC-74
                 URL: https://java.net/jira/browse/JPA_SPEC-74
             Project: jpa-spec
          Issue Type: Improvement
            Reporter: mkarg


I want to suggest that a future release of the JPA API provides a means to 
get the value of an entities version attribute.

Example: em.getVersion(myEntity);
he
Justification: Generic frameworks like JAX-RS or Servlets might have an 
interest in getting the value of the version attribute without "knowing" 
which is "the version attribute" for any particular entity. For example, 
JAX-RS or Servlets want to send a ETag header to a client for _any_ entity, 
but the Servlet does not "know" the class of that entity. Like when class 
name and primary key value are provided by a HTTP request. In that case, a 
solution would be em.getVersion(myEntity) which just should return the value 
of the version.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[jpa-spec issues] [JIRA] Created: (JPA_SPEC-74) Obtaining @Version value

mkarg (JIRA) 02/17/2014

[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-74) Obtaining @Version value

mkarg (JIRA) 02/17/2014
 
 
Close
loading
Please Confirm
Close