mirror of https://github.com/apache/openjpa.git
OPENJPA-1005 - Set persistence.xml schema version for PersistenceUnitInfo interface.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@760047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f5471bae7
commit
d3b1a2e368
|
@ -675,6 +675,7 @@ public class PersistenceProductDerivation
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
_info = new PersistenceUnitInfoImpl();
|
_info = new PersistenceUnitInfoImpl();
|
||||||
_info.setPersistenceUnitName(attrs.getValue("name"));
|
_info.setPersistenceUnitName(attrs.getValue("name"));
|
||||||
|
_info.setPersistenceXMLSchemaVersion(_persistenceVersion);
|
||||||
|
|
||||||
// we only parse this ourselves outside a container, so default
|
// we only parse this ourselves outside a container, so default
|
||||||
// transaction type to local
|
// transaction type to local
|
||||||
|
|
|
@ -79,6 +79,7 @@ public class PersistenceUnitInfoImpl
|
||||||
private DataSource _nonJtaDataSource;
|
private DataSource _nonJtaDataSource;
|
||||||
private boolean _excludeUnlisted;
|
private boolean _excludeUnlisted;
|
||||||
private URL _persistenceXmlFile;
|
private URL _persistenceXmlFile;
|
||||||
|
private String _schemaVersion = "1.0";
|
||||||
|
|
||||||
// A persistence unit is defined by a persistence.xml file. The jar
|
// A persistence unit is defined by a persistence.xml file. The jar
|
||||||
// file or directory whose META-INF directory contains the
|
// file or directory whose META-INF directory contains the
|
||||||
|
@ -505,8 +506,11 @@ public class PersistenceUnitInfoImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
public String PersistenceXMLSchemaVersion() {
|
public String PersistenceXMLSchemaVersion() {
|
||||||
throw new UnsupportedOperationException(
|
return _schemaVersion;
|
||||||
"JPA 2.0 - Method not yet implemented");
|
}
|
||||||
|
|
||||||
|
public void setPersistenceXMLSchemaVersion(String version) {
|
||||||
|
_schemaVersion = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Caching getCaching() {
|
public Caching getCaching() {
|
||||||
|
|
Loading…
Reference in New Issue