Print relationship records in Record.print method.
Add generateJSON method to Record class.