You need to use saveAssociated and parse your array as the first parameter:-
$this->AuditTrailDetail->saveAssociated($data);
You will also need to make sure $data contains the AuditTrailDetail you are saving the associated data against. For example:-
Array
(
[AuditTrailDetail] => Array
(
[id] => 1
)
[CodeConfiguration] => Array
(
[0] => Array
(
[LineNo] => 1
[IsDirty] =>
)
)
[ObjectAccountConfiguration] => Array
(
[0] => Array
(
[LineNo] => 1
[IsDirty] => 2
)
)
[TaxConfiguration] => Array
(
[0] => Array
(
[LineNo] => 2
[IsDirty] => 1
)
[1] => Array
(
[LineNo] => 1
[IsDirty] => 1
)
)
)