mongodb / laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

Home Page:https://www.mongodb.com/compatibility/mongodb-laravel-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hasOne() hasMany() relation not working with Dbref column

cemil91 opened this issue · comments

  • Laravel-mongodb Version: 4.4
  • PHP Version: 8.1
  • Database Driver & Version: 1.19

That's exact. Laravel and Eloquent is an opinionated framework: the relations use a single id field because that's how it's implemented with SQL databases. We can't change this behavior while extending the Eloquent classes.