mirror of https://github.com/apache/openjpa.git
OPENJPA-1870: Check if columnDefinition was provided before overriding blob type.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1031109 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
829334021c
commit
f946f8383b
|
@ -32,6 +32,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.openjpa.jdbc.identifier.DBIdentifier;
|
import org.apache.openjpa.jdbc.identifier.DBIdentifier;
|
||||||
|
import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
|
||||||
import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
|
import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
|
||||||
import org.apache.openjpa.jdbc.kernel.JDBCStore;
|
import org.apache.openjpa.jdbc.kernel.JDBCStore;
|
||||||
import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
|
import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
|
||||||
|
@ -459,7 +460,8 @@ public class MySQLDictionary
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTypeName(Column col) {
|
public String getTypeName(Column col) {
|
||||||
if (col.getType() == Types.BLOB) {
|
// handle blobs differently, if the DBItentifierType is NULL (e.g. no column definition is set).
|
||||||
|
if (col.getType() == Types.BLOB && col.getTypeIdentifier().getType() == DBIdentifierType.NULL) {
|
||||||
if (col.getSize() <= 0) // unknown size
|
if (col.getSize() <= 0) // unknown size
|
||||||
return blobTypeName; // return old default of 64KB
|
return blobTypeName; // return old default of 64KB
|
||||||
else if (col.getSize() <= 255)
|
else if (col.getSize() <= 255)
|
||||||
|
|
Loading…
Reference in New Issue