Skip to content

Commit ab3f795

Browse files
Revert to minimal varchar size of 1
1 parent e21225d commit ab3f795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/javawebstack/orm/mapper/DefaultMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Object mapToJava(Object source, Class<?> type) {
6868

6969
public SQLType getType(Class<?> type, int size) {
7070
if (type.equals(String.class) || type.equals(char[].class))
71-
return size > 65535 || size <= 1 ? SQLType.TEXT : SQLType.VARCHAR;
71+
return size > 65535 || size < 1 ? SQLType.TEXT : SQLType.VARCHAR;
7272
if (type.equals(UUID.class) || type.equals(char.class))
7373
return SQLType.VARCHAR;
7474
if (type.isEnum())

0 commit comments

Comments
 (0)