You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eloquent create() method does not update the id of a Pivot object.
It should as there are some circumstances (such as complex duplication) where this manual approach is required.
Note 1: Pivots are not JUST joining table A to B. Often it's joining A to B AND instance data about that join. This is where the basic attach/sync functionality can be insufficient in some cases (even if it is valid 90% of the time)
Note 2: The same result can also be manually achieved using the db/table method.
However, this may require a "reload" as the actual Pivot object also has useful methods and properties.
Steps To Reproduce:
Create a Pivot object within the system, mapped to a database such as:
Description:
The eloquent create() method does not update the id of a
Pivot
object.It should as there are some circumstances (such as complex duplication) where this manual approach is required.
Note 1: Pivots are not JUST joining table A to B. Often it's joining A to B AND instance data about that join. This is where the basic attach/sync functionality can be insufficient in some cases (even if it is valid 90% of the time)
Note 2: The same result can also be manually achieved using the db/table method.
However, this may require a "reload" as the actual Pivot object also has useful methods and properties.
Steps To Reproduce:
Create a Pivot object within the system, mapped to a database such as:
class GenericPivot extends Pivot
Then wherever you are testing from, attempt to
You should get a null response, where it should return the id.
The text was updated successfully, but these errors were encountered: