Hello list,
I'am trying to get a many2many relation, but i'am getting the following errors:
[middlegen] (middlegen.FileProducer 414 ) Invocation of method 'isRelationshipPkAndNonPkMembers' in class middlegen.plugins.hibernate.HibernateTable threw exception class java.lang.IllegalArgumentException : There is no column named taxatieobjecten_idtaxatieobject in the table named controlelijsten
[middlegen] org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isRelationshipPkAndNonPkMembers' in class middlegen.plugins.hibernate.HibernateTable threw exception class java.lang.IllegalArgumentException : There is no column named taxatieobjecten_idtaxatieobject in the table named controlelijsten
I'am trying it with the cvs version of middlegen/hibernate plugin,mysql version 4.0.18 and mysql-connector-java-3.0.12-production-bin.jar
build.xml:
<many2many>
<tablea name="controlelijsten" generate="true"/>
<jointable name="controlelijsten_taxatieobjecten" generate="false"/>
<tableb name="taxatieobjecten" generate="true" />
</many2many>
table layouts:
CREATE TABLE `controlelijsten` (
`idcontrolelijst` int(10) unsigned NOT NULL auto_increment,
`idexamen` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`idcontrolelijst`),
KEY `controlelijsten_FKIndex1` (`idexamen`),
CONSTRAINT `controlelijsten_ibfk_1` FOREIGN KEY (`idexamen`) REFERENCES `examens` (`idexamen`) ON DELETE NO ACTION ON UPDATE NO ACTION
) TYPE=InnoDB;
CREATE TABLE `controlelijsten_taxatieobjecten` (
`taxatieobjecten_idtaxatieobject` int(10) unsigned NOT NULL default '0',
`controlelijsten_idcontrolelijst` int(10) unsigned NOT NULL default '0',
KEY `controlelijsten_taxatieobjecten_FKIndex1` (`controlelijsten_idcontrolelijst`),
KEY `controlelijsten_taxatieobjecten_FKIndex2` (`taxatieobjecten_idtaxatieobject`),
CONSTRAINT `controlelijsten_taxatieobjecten_ibfk_1` FOREIGN KEY (`controlelijsten_idcontrolelijst`) REFERENCES `controlelijsten` (`idcontrolelijst`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `controlelijsten_taxatieobjecten_ibfk_2` FOREIGN KEY (`taxatieobjecten_idtaxatieobject`) REFERENCES `taxatieobjecten` (`idtaxatieobject`) ON DELETE NO ACTION ON UPDATE NO ACTION
) TYPE=InnoDB;
CREATE TABLE `taxatieobjecten` (
`idtaxatieobject` int(10) unsigned NOT NULL auto_increment,
`idtaxatieobjecttype` int(10) unsigned NOT NULL default '0',
`idexamen` int(10) unsigned default NULL,
PRIMARY KEY (`idtaxatieobject`),
KEY `taxatieobjecten_FKIndex1` (`idexamen`),
KEY `taxatieobjecten_FKIndex2` (`idtaxatieobjecttype`),
CONSTRAINT `taxatieobjecten_ibfk_1` FOREIGN KEY (`idexamen`) REFERENCES `examens` (`idexamen`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `taxatieobjecten_ibfk_2` FOREIGN KEY (`idtaxatieobjecttype`) REFERENCES `taxatieobjecttype` (`idtaxatieobjecttype`) ON DELETE NO ACTION ON UPDATE NO ACTION
) TYPE=InnoDB;
middlegen 2.0 V0 worked fine btw, the reason i want to use the cvs version is that the global generator="native" is supported.
Anyone ?
|