When using the attach(_:method:on:_:) and attach(_:on:_:) methods of SiblingsProperty, the optional closure provided to allow editing new pivots before they are saved can now optionally be both throws and async.
Closes #581.
Additional changes:
All versions of the isAttached(), attach(), and detach() methods of SiblingsProperty will now throw errors (specifically cases of the new SiblingsPropertyError enum) instead of calling fatalError() when an unsaved model is encountered.
The isAttached() method now uses a much faster and more efficient query to check whether a pivot already exists for the given model.
When using the
attach(_:method:on:_:)
andattach(_:on:_:)
methods ofSiblingsProperty
, the optional closure provided to allow editing new pivots before they are saved can now optionally be boththrows
andasync
.Closes #581.
Additional changes:
isAttached()
,attach()
, anddetach()
methods ofSiblingsProperty
will now throw errors (specifically cases of the newSiblingsPropertyError
enum) instead of callingfatalError()
when an unsaved model is encountered.isAttached()
method now uses a much faster and more efficient query to check whether a pivot already exists for the given model.