Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion guides/introduction/Watching without a schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ Since ecto supports working with tables withoun needed a schema, you may also wa
columns: [:title, :body, :author_id, :post_id],
column_map: %{body: :bodyContent},
association_columns: [:author_id, :post_id]
}, :updated, extra_columns: [:post_id]
}, :updated, extra_columns: [:post_id], label: :comment_updated_custom
}
]}
```

Everything works the same as with a schema, though make sure to specify your association columns if you want to subscribe to an association column.

To subscribe to the newly created watcher use the label that you set before:

```elixir
EctoWatch.subscribe(:comment_updated_custom)
```

Supported keys for configuring a table without a schema:

* `schema_prefix` (optional, defaults to `public`)
Expand Down