-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: mysql middlegen many2many
PostPosted: Thu May 27, 2004 6:53 pm 
Newbie

Joined: Thu May 27, 2004 6:33 pm
Posts: 1
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 ?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 29, 2004 12:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I will have to check that many-to-many has not been broken in the lastest CVS code base. Create a JIRA entry with a URL to this Topic.

Thanks,

BTW: You should use the Tools forum.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 30, 2004 8:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Fixed in CVS. Please try it out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.