b. the court finds that, in the interest of judicial economy, both actions may be heard together; provided, however, the petition for a protective order, including, but not limited to, a petition in which children are named as petitioners, shall remain a separate action and a separate order shall be entered in the protective order action. Protective orders may be dismissed in favor of restraining orders in the divorce or separate maintenance action if the court specifically finds, upon hearing, that such dismissal is in the best interests of the parties and does not compromise the safety of any petitioner.
If the defendant is a minor child, the petition shall be filed with the court having jurisdiction over juvenile matters.