From ccea98e4a25f7a736c91392ade594a4fecf0b053 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 24 Sep 2022 21:59:45 +0200 Subject: [PATCH] Document using existing row classes for views --- docs/pages/docs/Advanced Features/custom_row_classes.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/pages/docs/Advanced Features/custom_row_classes.md b/docs/pages/docs/Advanced Features/custom_row_classes.md index eea7bc69..c2bd407e 100644 --- a/docs/pages/docs/Advanced Features/custom_row_classes.md +++ b/docs/pages/docs/Advanced Features/custom_row_classes.md @@ -83,6 +83,13 @@ CREATE TABLE users( ) WITH User; ``` +This feature is also supported for views. Simply add the `WITH ClassName` syntax +after the name of the view in the `CREATE VIEW` statement: + +```sql +CREATE VIEW my_view WITH ExistingClass AS SELECT ... +``` + ## Inserts and updates with custom classes In most cases, generated companion classes are the right tool for updates and inserts.