I have a Person class and two labels in the database.
class Person { String name; String surname; List<String> phones; } Tables:
`phone` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `owner` INT UNSIGNED NOT NULL, `number` VARCHAR(50) NOT NULL, CONSTRAINT `PK_phone` PRIMARY KEY (`id`) ) `person` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `surname` VARCHAR(150) NOT NULL, `name` VARCHAR(150) NOT NULL, CONSTRAINT `PK_phonebook` PRIMARY KEY (`id`) ) ALTER TABLE `phone` ADD CONSTRAINT `FK_phone_person` FOREIGN KEY (`owner`) REFERENCES `person` (`id`) ON DELETE Cascade ON UPDATE Cascade ; SET FOREIGN_KEY_CHECKS=1 ; How can I add an instance of the Person class with a List<String> argument to the database so that the records from this sheet fall into the phones tablet and are drawn to Person during output ??