Skip to content

Commit cc7f705

Browse files
committed
HHH-19011 fix incorrect placement of table comment with @comment
This annotation is deprecated in 7, but I guess this is a candidate for backport
1 parent 55455c6 commit cc7f705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/binder/internal/CommentBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void bind(Comment comment, MetadataBuildingContext context, PersistentCla
3535
+ "' was annotated '@Comment'");
3636
}
3737
else if ( value instanceof Collection collection ) {
38-
Table table = collection.getTable();
38+
Table table = collection.getCollectionTable();
3939
// by default, the comment goes on the table
4040
if ( on.isEmpty() || table.getName().equalsIgnoreCase( on ) ) {
4141
table.setComment( text );

0 commit comments

Comments
 (0)