Now using the supplied 'primaryId' as _id column.

The problem was that "createOrUpdate" wasn't working, because we had a
unique constraint on the primaryId column - but it couldn't update,
because _id wasn't set. Not completely sure using the supplied id is the
right thing to do here - it has the potential to change, I'm not sure
what problems that would cause (rather than using a generated id and
updating that row).