I'm trying to write an Import/Export API module for the Station Playlist type. Playlist is a node type, but there's a separate Tracks table, which does not have a primary key -- it just references the playlist's node ID. I've tried all sorts of different ways, but I can't get the exporter to include the tracks. It's just left out. Any ideas?
Here's what I have currently. Can anyone see the problem?
<?php
function playlist_export_def() {
$defs = array();
$type = 'program_playlist';
$def = importexportapi_node_get_def($type);
$type_info = module_invoke('station_schedule', 'node_info');
$type_info = $type_info[$type];
$def['#title'] = $type_info['name'];
$def['#title'][0] = strtoupper($def['#title'][0]);
$def['#xml_plural'] = $def['#csv_plural'] = 'program-playlists';
$def['revisions']['#csv_plural'] = 'program-playlist-revisions';
$def['type']['#db_filter'] = array(
'values' => array($type)
);
$def['tracks'] = array(
'#type' => 'array',
'#title' => t('Playlist tracks'),
'#db_default_table' => 'station_playlist_track',
'#xml_plural' => 'tracks',
'#xml_mapping' => 'track',
'#csv_plural' => 'playlist-tracks',
);
$def['tracks']['nid'] = array(
'#type' => 'int',