If performance is a concern you need to avoid the ORM as much as you can, if it's a repetitive operation to look up vendors Id based on the account number, you can write an insert/update trigger on the vendor to get the userId from the Accounts table.
To summarize you can apply this update SQL query once, then write a trigger on both insert and update actions on the vendor table to update it's userId.