Results 5 comments of Seba

@anishdcruz https://laravel.com/docs/5.5/eloquent-relationships Syncing Associations - chapter.

@alcaeus okay, that's not a big issue, I'm fixing it with `$unwind` anyway. The biggest problem is with this _ids and dates shown as objects.

@alcaeus this is how I build my query ``` $aggregateQuery = []; // Add user relation. **applyRelation is a helper for $lookup $aggregateQuery[] = $this->applyRelation( 'users', 'user_mongo_id', '_id', 'user' );...

@alcaeus this is `Proposal` model ``` public function user() { return $this->belongsTo(User::class); } public function proposalRound() { return $this->belongsTo(ProposalRound::class); } ```

@alcaeus exactly. I have two exact same relations on `proposal` model: `user` and `round`. Both relates to `proposal` as 1-to-1. Round is retrieved as single doc with correct _id and...