Express Error: Value is missing an assigned ID for field 'attribute_key'

Here is another related post:

Also, I am having troubles finding the correct “use” statements to have PHP recognize associateEntries()

$jgEntry->associateEntries()->setLabelHub($labelHub);
$jgEntry->associateEntries()->setLeaderOne($leaderOne);

Error: Call to undefined method Concrete\Core\Express\EntryBuilder::associateEntries()

This doesn’t make sense. associatedEntries() is in

/concrete/src/Entity/Express/Entry.php

and the entry stuff is in

/concrete/src/Express/EntryBuilder.php