openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1632) Add @VersionColumn and @VersionStrategy to orm.xml
Date Fri, 16 Apr 2010 04:09:24 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857661#action_12857661
] 

Jeremy Bauer commented on OPENJPA-1632:
---------------------------------------

The orm content is based upon a schema defined in the JPA 1.0 & 2.0 specifications.  In
some environments/JREs (but not all, due to bugs in some validating parsers), the orm.xml
gets validated against this schema before the orm is parsed.  If the orm contains elements
not defined in the base orm xsd, validation will fail.  Updating the XML parser to handle
these new elements make work fine in some environments, but not others - since the orm.xml
will not validate against the schema.

IMO, a better approach would be to provide a new OpenJPA-specific mapping file using an OpenJPA-defined
schema.  That would allow many of OpenJPA's custom annotations to be defined in XML.  I think
we should seriously consider adding this capability in a future release.  This would also
give users an option for eliminating OpenJPA-specific annotations.  Using OpenJPA annotations
adds a hard runtime and compile-time dependency on the OpenJPA library.  This is problematic
for those needing to code strictly to the standard JPA APIs.

> Add @VersionColumn and @VersionStrategy to orm.xml
> --------------------------------------------------
>
>                 Key: OPENJPA-1632
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1632
>             Project: OpenJPA
>          Issue Type: Improvement
>    Affects Versions: 2.1.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>         Attachments: OPENJPA-1632.patch
>
>
> Add support of @VersionColumn and @VersionStrategy to orm.xml:
>     <entity class="dbgenvsn.EntityA" >
>     	<version-strategy name="com.ibm.websphere.persistence.RowChangeTimestampStrategy"
/>
> 	<version-column name="versionColumn" />    	 
>     </entity>
> so that the source EntityA does not need to recompile to enable a particular version
strategy.

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

        

Mime
View raw message