Skip to content

Commit 3d0cf85

Browse files
committed
feat: include condition at oracle nosql provider to handle with enumerator
Signed-off-by: Otavio Santana <[email protected]>
1 parent 35daf71 commit 3d0cf85

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jnosql-oracle-nosql/src/main/java/org/eclipse/jnosql/databases/oracle/communication/FieldValueConverter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import oracle.nosql.driver.values.StringValue;
2828

2929
import java.lang.reflect.Array;
30+
import java.util.Enumeration;
3031
import java.util.Map;
3132

3233
enum FieldValueConverter {
@@ -59,9 +60,10 @@ FieldValue of(Object value){
5960
return entries((Map<String, ?>) value);
6061
}else if (value instanceof FieldValue) {
6162
return (FieldValue) value;
62-
} else {
63-
throw new UnsupportedOperationException("There is not support to: " + value.getClass());
63+
} else if(value instanceof Enum<?> enumeration) {
64+
return new StringValue(enumeration.name());
6465
}
66+
throw new UnsupportedOperationException("There is not support to: " + value.getClass());
6567
}
6668

6769
Object toObject(FieldValue value) {

0 commit comments

Comments
 (0)