I'm trying to implement this translation example (https://gist.github.com/tristanbes/2116290) with SonataAdminBundle & DoctrineExtensions, but when I run the create action form, the database translation field object_id is empty. All other fields are filled correctly on database!
My database schema:
CREATE TABLE `Book` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` longtext,
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQ_6BD70C0F5E237E06` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
CREATE TABLE `book_translations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`object_id` int(11) DEFAULT NULL,
`locale` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
`field` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
`content` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`),
UNIQUE KEY `lookup_unique_idx` (`locale`,`object_id`,`field`),
KEY `IDX_9F5610DF232D562B` (`object_id`),
CONSTRAINT `FK_9F5610DF232D562B` FOREIGN KEY (`object_id`) REFERENCES `Book` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
Can anyone help me? I have the same source!!!
Thanks in advance, Luis Miguens