updated for recent changes in magus (TableDetails now takes fkeyChildren)