[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-701) Using @CollectionId annotation breaks schema generation

Tim Evers (JIRA) noreply at atlassian.com
Thu Mar 6 17:40:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29722 ] 

Tim Evers commented on ANN-701:
-------------------------------

OK, I've managed to get the building of the table working. But, the @CollectionId annotation is ignored. In that the n_key_contact column is not created by the automatic schema generation.

Should I raise this as a new issue?

> Using @CollectionId annotation breaks schema generation
> -------------------------------------------------------
>
>                 Key: ANN-701
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-701
>             Project: Hibernate Annotations
>          Issue Type: Bug
>         Environment: Hibernate version: 3.2.5 GA
> Hibernate Annotations version: 3.3.0 GA
> Ingres Database 2006
>            Reporter: Tim Evers
>
> Basically, if I use the org.hibernate.annotations.CollectionId annotation, for some reason, hibernate won't generate the table for the mapping.
> This works:
>     @CollectionOfElements
>     @JoinTable(
>         name = "contact",
>         joinColumns = @JoinColumn(name = "n_key_person"))
>     @IndexColumn(name = "n_index_order")
> This doesn't:
>     @CollectionOfElements
>     @JoinTable(
>         name = "contact",
>         joinColumns = @JoinColumn(name = "n_key_person"))
>     @CollectionId(
>         columns = @Column(name = "n_key_contact"),
>         type = @Type(type = "long"),
>         generator = "increment" )
> It fails when it tries to select from the contact table, because it didn't get created.
> The @CollectionId mapping seems to work exactly the way I want if I go create the contact table manually. 
> Forum topic here:
> http://forums.hibernate.org/viewtopic.php?t=980254&highlight=collectionid+schema

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

        



More information about the hibernate-issues mailing list