Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbbed6d

Browse files
Address review comments: Remove IDE config and refactor duplication check
1 parent 2f52165 commit bbbed6d

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/mapping/Value.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ default void checkColumnDuplication(Set<String> distinctColumns, String owner) {
194194
if ( isColumnInsertable( i ) || isColumnUpdateable( i ) ) {
195195
final Column col = (Column) selectable;
196196

197-
String tableName = ( getTable() != null ) ? getTable().getName() : "";
198-
String uniqueKey = tableName.isEmpty() ? col.getName() : tableName + "." + col.getName();
197+
final var primaryTable = getTable();
198+
final String tableName = primaryTable != null ? primaryTable.getName() : "";
199+
final String uniqueKey = tableName.isEmpty() ? col.getName() : tableName + "." + col.getName();
199200

200201
if ( !distinctColumns.add( uniqueKey ) ) {
201202
throw new MappingException(

0 commit comments

Comments
 (0)