Skip to content

Commit 590e15c

Browse files
committed
Revert fix and update Postgres version in Docker Compose
Signed-off-by: Vadim <[email protected]>
1 parent 6529baa commit 590e15c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: '3'
22
services:
33
db:
4-
image: 'postgres:9.6.10'
4+
image: 'postgres:13'
55
environment:
66
POSTGRES_PASSWORD: 'postgres'
77
ports:
8-
- '5432:5432'
8+
- '5432:5432'

src/main/java/org/zalando/typemapper/core/fieldMapper/ObjectFieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static Object mapField(@SuppressWarnings("rawtypes") final Class clazz, f
6262

6363
// instantiate enums by string value
6464
if (clazz.isEnum()) {
65-
final DbResultNode currentNode = node.getChildByName(node.getName());
65+
final DbResultNode currentNode = node.getChildByName(node.getType());
6666
if (currentNode == null) {
6767
final String error =
6868
String.format(

src/test/java/org/zalando/typemapper/namedresult/CollectionWithEnumsTestIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public void testListWithEnums() throws Exception {
3030
final TypeMapper<ClassWithListOfEnums> mapper = TypeMapperFactory.createTypeMapper(ClassWithListOfEnums.class);
3131
int i = 0;
3232
while (rs.next()) {
33-
final ClassWithListOfEnums result = (ClassWithListOfEnums) mapper.mapRow(rs, i++);
33+
final ClassWithListOfEnums result = mapper.mapRow(rs, i++);
3434
Assert.assertNotNull(result);
3535
Assert.assertNotNull(result.getEnumList());
36-
Assert.assertTrue(result.getEnumList().size() == 2);
36+
Assert.assertEquals(2, result.getEnumList().size());
3737
Assert.assertNotNull(result.getEnumList().get(0));
3838
Assert.assertNotNull(result.getEnumList().get(1));
3939

0 commit comments

Comments
 (0)