Skip to content

Improve ORM mapping #1242

@brendt

Description

@brendt

The ORM uses generated column names to map data unto the right models, eg.

`parent.through[]`.`id` AS `parent.through[].id`

This leads to a number of problems:

  • Accurately adding or removing backticks based on SQL grammar becomes impossible
  • Writing custom queries and mapping them to model classes is a pain, since you need to manually write the exact same aliases

I think it's possible to refactor QueryToModelMapper so that we can simply write

parent.trough.id

And still map it to the right relation.

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions