DEV Community

Discussion on: TIL: Ecto's pin is coercing

Collapse
ryanwinchester profile image
Ryan Winchester • Edited on

If you aren't using a schema, you can also define the type in the query like:

owner_id = "42"

where(
  query,
  [account],
  account.owner_id == type(^owner_id, :integer)
)
Enter fullscreen mode Exit fullscreen mode