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
A collection called via the API (e.g. /api/products) suddenly returns CastError: Cast to ObjectId failed for value "request-callback" (type string) at path "_id" for model "products".
[17:55:59] ERROR (payload): CastError: Cast to ObjectId failed for value "request-callback" (type string) at path "_id"for model "products"
No changes were made to the collections apart from upgrading tov1.0.11. Not sure how / what caused this relationship to break. Setting maxDepth: 0 does fix, but do require the nested document.
{name: 'product',label: 'Product to link to',type: 'relationship',relationTo: 'products',hasMany: false,maxDepth: 1,required: true,admin: {condition: (_,siblingData)=>siblingData?.type==='product',width: '50%',},},
Wondering if there was a breaking change I was unaware of?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
A collection called via the API (e.g.
/api/products
) suddenly returnsCastError: Cast to ObjectId failed for value "request-callback" (type string) at path "_id" for model "products"
.No changes were made to the collections apart from upgrading to
v1.0.11
. Not sure how / what caused this relationship to break. SettingmaxDepth: 0
does fix, but do require the nested document.Wondering if there was a breaking change I was unaware of?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions