It has to involve a state-defined militia that automatically triggers the 2nd Amendment.
Show me where in the 2nd amendment that is says the militia has to be operated. Here is a clue - it ain’t in there. And for good reason.