[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1768) hbm2java: error generating collection of components

Carsten Hoehne (JIRA) jira-events at lists.jboss.org
Thu Feb 28 04:57:42 EST 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-1768?page=comments#action_12400812 ] 
            
Carsten Hoehne commented on JBIDE-1768:
---------------------------------------

Hello,
i try to check it on the weekend.
But i suppose its not right.
This mapping is the problem:
	@ManyToMany(fetch = FetchType.EAGER)
	@JoinTable(name = "samplewell", joinColumns = { @JoinColumn(name = "SAMPLE2WELLID", nullable = false, updatable = false) }, inverseJoinColumns = {
			@JoinColumn(name = "SAMPLEID", updatable = false),
			@JoinColumn(name = "well_adress", updatable = false),
			@JoinColumn(name = "well_column", updatable = false),
			@JoinColumn(name = "well_row", updatable = false) })
	@Cascade( { CascadeType.SAVE_UPDATE })
	public Collection<SampleWellType> getSampleWell() {

I have not succeded in deploying with such mapping. I had to use org.hibernateannotations.CollectionOfElements as mentioned in previous comment. The problem seems to be that SampleWelltype is not a mapped entity. So it cannot be the target of a many2many association.

But i will recheck and record the result back to jira

> hbm2java: error generating collection of components
> ---------------------------------------------------
>
>                 Key: JBIDE-1768
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1768
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 2.0.0.GA
>            Reporter: Carsten Hoehne
>         Assigned To: Vitali Yemialyanchyk
>         Attachments: demo.zip, ex - cfg.jpg, ex - cogen - cfg 1.jpg, ex - cogen - cfg 2.jpg, ex - stack 1.1.jpg, ex - stack 1.2.jpg, ex - stack 2.1.jpg, ex - stack 2.2.jpg, exception 1.jpg, result.zip, Sample.hbm.xml, Sample2Well.hbm.xml, test-case-1.jpg, test-case-1_add_2.jpg, test-case-2.jpg, ZZ_Sample.zip
>
>
> Java code with annotations should be generated from a mapping file. This file contains a collection of components. Then an exception is thrown. See forum reference.
> The files will be attached. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list