Lattice Grid Buy a licence

Data Router ยท console.warn

relateRows needs a `foreignKey` (the child f...

Printed by Data Router, prefixed [lattice], since 1.84.0.

Warnings reference › data-router:relaterows-no-foreignkey

Identifier
data-router:relaterows-no-foreignkey
Raised by
Data Router
Since
1.84.0

What happened

relateRows was called without a foreignKey, so the router cannot tell which child rows belong to a deleted parent. The rule is dropped rather than the router throwing.

The fix

Set foreignKey to the child field holding the parent's key (a field name or fn(row)).

The smallest fix

router.relateRows({ child: 'address', parent: 'company', foreignKey: 'companyId', onParentDelete: 'cascade' })

Reference

Covered in full at the API reference.