Skip to content

Ecto allows parentheses in field names without raising an error #4588

@dkuku

Description

@dkuku

Elixir version

latest

Database and Version

any?

Ecto Versions

main

Database Adapter and Versions (postgrex, myxql, etc)

ecto without adapters

Current behavior

Adding parentheses to field names (e.g., q.title()) is accepted and processed as if the parentheses weren't present. This behavior could be misleading.

Example:

# This works:
order_by("q", [q], [asc: q.title()])

# Same as:
order_by("q", [q], [asc: q.title])

Expected behavior

I would expect to get an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions