diff --git a/jOOQ/src/main/java/org/jooq/impl/DDL.java b/jOOQ/src/main/java/org/jooq/impl/DDL.java index 41df88b71a..696851b774 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DDL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DDL.java @@ -399,7 +399,9 @@ final class DDL { Comment tComment = table.getCommentPart(); if (!StringUtils.isEmpty(tComment.getComment())) - if (table.getTableType().isView()) + if (table.getTableType() == MATERIALIZED_VIEW) + result.add(ctx.commentOnMaterializedView(table).is(tComment)); + else if (table.getTableType() == VIEW) result.add(ctx.commentOnView(table).is(tComment)); else result.add(ctx.commentOnTable(table).is(tComment));