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,7 +675,8 @@ public class PersistenceProductDerivation
|
|||
throws SAXException {
|
||||
_info = new PersistenceUnitInfoImpl();
|
||||
_info.setPersistenceUnitName(attrs.getValue("name"));
|
||||
|
||||
_info.setPersistenceXMLSchemaVersion(_persistenceVersion);
|
||||
|
||||
// we only parse this ourselves outside a container, so default
|
||||
// transaction type to local
|
||||
String val = attrs.getValue("transaction-type");
|
||||
|
|
|
@ -79,6 +79,7 @@ public class PersistenceUnitInfoImpl
|
|||
private DataSource _nonJtaDataSource;
|
||||
private boolean _excludeUnlisted;
|
||||
private URL _persistenceXmlFile;
|
||||
private String _schemaVersion = "1.0";
|
||||
|
||||
// A persistence unit is defined by a persistence.xml file. The jar
|
||||
// file or directory whose META-INF directory contains the
|
||||
|
@ -505,8 +506,11 @@ public class PersistenceUnitInfoImpl
|
|||
}
|
||||
|
||||
public String PersistenceXMLSchemaVersion() {
|
||||
throw new UnsupportedOperationException(
|
||||
"JPA 2.0 - Method not yet implemented");
|
||||
return _schemaVersion;
|
||||
}
|
||||
|
||||
public void setPersistenceXMLSchemaVersion(String version) {
|
||||
_schemaVersion = version;
|
||||
}
|
||||
|
||||
public Caching getCaching() {
|
||||
|
|
Loading…
Reference in New Issue