Refs #22875 -- Fixed an optimizer test to use a valid scenario.
Refs #22875 -- Fixed an optimizer test to use a valid scenario.

An explicit intermediary many-to-many relationship must declare forward and
reverse foreign keys. The original issue was in the autodetector as these
operations shouldn't have been generated in this order in the first place
which is tested by AutodetectorTests.test_create_with_through_model.

charettes/django,schinckel/django,pauloxnet/django,django/django,elena/django,blighj/django,apollo13/django,auvipy/django,MarkusH/django,monetate/django,rsalmaso/django,manhhomienbienthuy/django,felixxm/django,MarkusH/django,frankvdp/django,freakboy3742/django,frankvdp/django,koordinates/django,atul-bhouraskar/django,wkschwartz/django,theo-l/django,pauloxnet/django,pauloxnet/django,monetate/django,timgraham/django,dsanders11/django,dsanders11/django,georgemarshall/django,apollo13/django,theo-l/django,theo-l/django,charettes/django,frankvdp/django,MarkusH/django,takis/django,apollo13/django,googleinterns/django,wkschwartz/django,blighj/django,freakboy3742/django,auvipy/django,charettes/django,elena/django,googleinterns/django,django/django,adamchainz/django,atul-bhouraskar/django,theo-l/django,rsalmaso/django,simonw/django,adamchainz/django,elena/django,atul-bhouraskar/django,adamchainz/django,solarissmoke/django,kaedroho/django,timgraham/django,timgraham/django,ghickman/django,koordinates/django,googleinterns/django,auvipy/django,adamchainz/django,solarissmoke/django,apollo13/django,felixxm/django,wkschwartz/django,ghickman/django,schinckel/django,monetate/django,elena/django,takis/django,atul-bhouraskar/django,takis/django,blighj/django,rsalmaso/django,dsanders11/django,felixxm/django,simonw/django,EmadMokhtar/Django,felixxm/django,kaedroho/django,shaib/django,solarissmoke/django,koordinates/django,blighj/django,freakboy3742/django,georgemarshall/django,EmadMokhtar/Django,manhhomienbienthuy/django,django/django,koordinates/django,MarkusH/django,georgemarshall/django,simonw/django,takis/django,shaib/django,fenginx/django,timgraham/django,frankvdp/django,rsalmaso/django,schinckel/django,claudep/django,solarissmoke/django,django/django,EmadMokhtar/Django,fenginx/django,claudep/django,pauloxnet/django,claudep/django,claudep/django,auvipy/django,simonw/django,manhhomienbienthuy/django,dsanders11/django,fenginx/django,ghickman/django,georgemarshall/django,charettes/django,manhhomienbienthuy/django,kaedroho/django,shaib/django,fenginx/django,shaib/django,wkschwartz/django,schinckel/django,ghickman/django,googleinterns/django,monetate/django