Skip to main content
Version: Next

Marten 0.6.0 release notes

Under development.

Requirements and compatibility

  • Crystal: 1.12, 1.13, and 1.14.
  • Databases:
    • MariaDB 10.4 and higher.
    • MySQL 8.0.11 and higher.
    • PostgreSQL 12 and higher.
    • SQLite 3.27.0 and higher.

New features

Minor features

Models and databases

  • Query sets now support XOR operations when performing complex queries involving q expressions. Additionally, combining query sets using the XOR operator (^) is now also supported (see #^ (XOR)).
  • A new slugify option was added to slug model fields in order to make it possible to automatically generate a slug value from another local model field.
  • Query pages (instances of Marten::DB::Query::Page) now expose a #pages_count method that allows to get the total number of pages.
  • Related objects are now automatically loaded when accessing backward relations (such as backward many-to-one relations or backward one-to-one relations).

Handlers and HTTP

Templates

  • An alias for the #url template tag (#reverse) was introduced.

Development

  • A new --log-level command option was introduced to make it easier to configure the log level to use when running management commands (see Shared options for more details).
  • The new management command now makes it possible to generate projects without configured databases when the --database=none option is used.
  • Projects generated with the new management command now include the Referrer-Policy middleware by default.
  • The new management command now generates a seed.cr file when generating new project structures.
  • A new seed management command was introduced to make it easy to execute seed files.
  • Log entries generated when running the development server (serve management command) in debug mode now include more details about processed requests, rendered templates, and executed SQL queries.