Skip to content

Composite Primary Key watcher fails #47

Description

@dv01sw

In my application.ex:

  {EctoWatch,
   repo: Bla.Repo,
   pub_sub: Bla.PubSub,
   watchers: [
     {Bla.Things, :inserted}
   ]},

In my schema:

  @primary_key false
  schema "things" do
    field :timestamp, :utc_datetime, primary_key: true
    field :something, :string, primary_key: true
    field :other, :string
  end

In WatcherOptions, Line 32 it crashes:

  [primary_key] = schema_mod.__schema__(:primary_key)

schema_mod.schema(:primary_key) returns a list of two keys, which cannot be matched to [primary_key]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions