mirror of https://github.com/apache/openjpa.git
OPENJPA-1083 Adding trace message
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@781826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a8ec9e182
commit
4b7e773753
|
@ -18,18 +18,19 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.openjpa.jdbc.schema;
|
package org.apache.openjpa.jdbc.schema;
|
||||||
|
|
||||||
import java.sql.DatabaseMetaData;
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
import java.sql.DatabaseMetaData;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
|
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
||||||
|
import org.apache.openjpa.lib.log.Log;
|
||||||
import org.apache.openjpa.lib.util.Localizer;
|
import org.apache.openjpa.lib.util.Localizer;
|
||||||
import org.apache.openjpa.lib.util.StringDistance;
|
import org.apache.openjpa.lib.util.StringDistance;
|
||||||
import org.apache.openjpa.util.InvalidStateException;
|
import org.apache.openjpa.util.InvalidStateException;
|
||||||
import org.apache.openjpa.jdbc.sql.DBDictionary;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a database foreign key; may be a logical key with no
|
* Represents a database foreign key; may be a logical key with no
|
||||||
|
@ -782,7 +783,10 @@ public class ForeignKey
|
||||||
localtable.removeForeignKey(fkTemp);
|
localtable.removeForeignKey(fkTemp);
|
||||||
}
|
}
|
||||||
} catch(Exception ex){
|
} catch(Exception ex){
|
||||||
// TO DO -- It would be nice to log a warning here.
|
Log log = dbdict.getLog();
|
||||||
|
if (log.isTraceEnabled()) {
|
||||||
|
log.trace(_loc.get("except-read-fk-name"), ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5020,4 +5020,8 @@ public class DBDictionary
|
||||||
|
|
||||||
return combined;
|
return combined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Log getLog() {
|
||||||
|
return log;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,3 +152,5 @@ conn-failed: Failed to connect to DataSource. Verify Driver "{0}", URL "{1}" \
|
||||||
and connection properties "{2}" are correct. See the nested exception for \
|
and connection properties "{2}" are correct. See the nested exception for \
|
||||||
further details.
|
further details.
|
||||||
no-column: Can not find column "{0}" in table "{1}"
|
no-column: Can not find column "{0}" in table "{1}"
|
||||||
|
except-read-fk-name: An exception occurred when obtaining the foreign key \
|
||||||
|
names from the database.
|
||||||
|
|
Loading…
Reference in New Issue