Skip to content

core-v4.4.5

Choose a tag to compare

@IamKirbki IamKirbki released this 27 Feb 14:55
· 10 commits to main since this release
49417f4

✨ Added: Nested Relation Support (Relation of Relation)

This update introduces support for nested relationship loading (relation of relation).

You can now eager-load relations through other relations using dot notation.

Example

    RecipeOutputs() {
        return this.hasMany(new RecipeOutput(), "recipe_id", "id");
    }

    OutputItems() {
        return this.hasMany(new Item(), "id", "item_id", "output_items.items", "output_items");
    }

The ORM will now correctly resolve and join:

Major
 └─ InternshipCompany (ManyToMany)
       └─ Address (hasOne)

What This Enables

  • Eager loading of nested relations via dot notation
  • Support for relation chains across junction tables
  • Structured nested hydration of related models

Internal Improvements

  • Nested relations are tracked and processed in join generation
  • Improved relation graph traversal