magento2 – Can the insertMultiple method return all auto-incremental IDs inserted?


I need to insert lines in two custom tables (which have a many-to-many relationship).

I want to use batch insertion (insertMultiple method in Magento 2) for parent and child tables.

The problem is that if I'm going to do a batch insert in the parent table with the help of an insertMultiple method, will this method return all the inserted IDs to use in the child table (relationship)? ?

Please suggest any feasible and reliable solution.