You could also just do a regular sql query like:
R::exec('insert into protect(id) values(?)',array($id))
Then your id would be there and when you store the bean it will update that row. However if you have a lot of data it isn't efficient to do 2 queries per row. So you could just insert all fields in the exec, and just use beans for your queries, however then you lose RedBean's magic of inserting or finding any related beans. With a few modifications you could use a special meta field to force an insert rather than an update when (!$id or getMeta('forceInsert')), and then pass the $id to the insertRecord() and if its not null use that instead of the $default. I investigated this because the table I was migrating to redbean had 3 relations, however in the end I just reverted back to using exec for all fields and I just find() and store() each of the related beans myself first before using their ids in the exec(). Since store() checks if tainted, it doesn't hit the db if the bean isn't a new one. And I assume somewhere in red bean it does the same thing for when you insert a bean with a related bean. So overall performance is probably the same.