Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPA 2.0 support not enabled for OpenJPA (and others?) [SPR-6975] #11640

Closed
spring-projects-issues opened this issue Mar 11, 2010 · 2 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Jerry Carter opened SPR-6975 and commented

The SpringPersistenceUnitInfo property 'persistenceXMLSchemaVersion' defaults to 1.0 and is never changed. This is a MAJOR headache for ORMs which use the version information to adjust their behavior.

The bug appears to be in org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader. The version attribute is not used when the document is read to set the value in the SpringPersistenceUnitInfo instances.


Affects: 3.0.1

Attachments:

Referenced from: commits 7da13e7

@spring-projects-issues
Copy link
Collaborator Author

Jerry Carter commented

The bug is in org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.java. The version attribute of the <persistence> element needs to be read and then passed in to the function which parses each <persistence_unit>.

The fix adds three lines and changes a fourth. All changes are marked with // JC:

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good catch: We indeed missed the version parsing there. This wasn't noticed simply because EclipseLink 2.0 and Hibernate 3.5 apparently activate JPA 2.0 support in any case.

Fixed as of Spring 3.0.2 - will be available in the next snapshot (611).

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants