Import csv file

Hello,
In version 5.5, I’m trying to import a csv file containing the definition of the product categories.
I get an error message when I try to import a file containing child categories and parent categories (parents are defined before in the file):

Relation not found: <parent category> in product.categorie

On the other hand if I cut the file in 2 and I import the parents first and then the children no problem.

Yet it seems to me that at one time it worked. Is this the expected behavior or is it a bug?

Imported records are created at once so the CSV file can not contain self references.
I do not think it ever worked differently.

Ok, I probably confused, so I would deal in several passes

When things get more complex I use the api to import data or as someone suggested here you can use proteus.

I am using Proteus to initialize my test database. I was just checking the syntax of the CSV files that could be imported by the Tryton client and then importing them with Proteus in a scenario.
Thank you for your answers.