Skip to content

Commit cc9b034

Browse files
vominhtriuslpandzic
authored andcommitted
Filterout empty table name in CustomExtendedTypeFactory
1 parent a1675a5 commit cc9b034

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

infobip-spring-data-jdbc-annotation-processor-common/src/main/java/com/infobip/spring/data/jdbc/annotation/processor/CustomExtendedTypeFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.querydsl.codegen.TypeMappings;
2525
import com.querydsl.codegen.utils.model.TypeCategory;
2626
import org.springframework.data.relational.core.mapping.Table;
27+
import org.springframework.util.StringUtils;
2728

2829
public class CustomExtendedTypeFactory extends ExtendedTypeFactory {
2930

@@ -142,6 +143,7 @@ protected String getTableName(EntityType model) {
142143
return Optional.ofNullable(elements.getTypeElement(className)
143144
.getAnnotation(Table.class))
144145
.map(this::getTableName)
146+
.filter(StringUtils::hasText)
145147
.orElse(tableName);
146148
}
147149

0 commit comments

Comments
 (0)