Skip to content

1.47.0 - Relax restrictions on ModelAlias use and join conditions

Compare
Choose a tag to compare
@penny-for-vapor penny-for-vapor released this 01 Feb 19:35
· 17 commits to main since this release
3ae5187

What's Changed

Relax restrictions on ModelAlias use and join conditions by @gwynne in #593

  1. Relaxes most of Fluent’s filter operators to only require Schema conformance rather than Model. This enables ModelAlias usage with all operators that it previously didn’t work for.
  2. Enables all model value filters in joins (e.g. join(Foo.self, on: \Foo.$bar.$id == \Bar.$id && \Bar.$value > 4)).
  3. Adds .sql(raw:), .sql(embed:), and .sql(_:) for Fluent joins.

(Note: Not a semver-major break because the new generic requirements on operators are always strict supersets of the old ones.)

Supersedes #432. Fixes #431. Fixes #536.

This patch was released by @gwynne

Full Changelog: 1.46.0...1.47.0