-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
Running version 4.23.2
Say I have two models, Parent and Child and an instance of each parent and child respectively. Parent hasMany Child and Child belongsTo Parent.
Why is it that the association create behavior is different when creating the other? I expected the new instance returned from each create call.
createChildResult = await parent.createChild()
// createChildResult is a new Child instance ✅
createParentResult = await child.createParent()
// createParentResult is the same child??? ❌
createParentResult === child // Why is this true???The docs don't seem to cover this backwards behavior either. The return type is just listed as Promise with no types.
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type