like that, yes. but i would not create a new model in the action. removing my is ok but try to create an independent function which checks for entities which are to be created.

and you need the action code to be in a while loop, obivously...