@SuppressWarnings("rawtypes")
public PersistenceUnitCommon configure(PersistenceUnitCommon unit, JPADataSource ds)
{
unit.excludeUnlistedClasses(Boolean.FALSE);
PersistenceCommonDescriptor descriptor = (PersistenceCommonDescriptor) unit.up();
if (new SingleVersion(descriptor.getVersion()).compareTo(new SingleVersion("2.1")) >= 0)
{
PropertiesCommon properties = unit.getOrCreateProperties();
properties.createProperty().name("javax.persistence.schema-generation.database.action").value("create");
}
return unit;