I'm trying to create nested record structures using TYPO3's DataHandler data structures (tested with TYPO3 v7). However relations are not created as expected. Consider the following data structure:
$data = array(
'sys_category' =>
array(
'NEW_1' =>
array(
'title' => 'Category 1',
'pid' => $pid,
),
'NEW_2' =>
array(
'title' => 'Category 3',
'pid' => $pid,
),
'NEW_3' =>
array(
'title' => 'Category 2',
'pid' => $pid,
),
'NEW_4' =>
array(
'title' => 'Category 1.1',
'pid' => $pid,
'parent' => 'NEW_1',
),
'NEW_5' =>
array(
'title' => 'Category 1.2',
'pid' => $pid,
'parent' => 'NEW_1',
),
'NEW_6' =>
array(
'title' => 'Category 3.1',
'pid' => $pid,
'parent' => 'NEW_2',
),
),
);
This gives the following result in the database:
uid title parent
1 Category 1 0
2 Category 3 0
3 Category 2 0
4 Category 1.1 0
5 Category 1.2 0
6 Category 3.1 0
Note the "0" value for all "parent" fields. Why is it that the "NEW_*" values are not interpreted for the "parent" fields set in the data structure?