`$metadata->isCollectionValuedAssociation()` IIRC