[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3162) Using @CollectionId annotation breaks schema generation
Tim Evers (JIRA)
noreply at atlassian.com
Tue Mar 4 23:03:33 EST 2008
Using @CollectionId annotation breaks schema generation
-------------------------------------------------------
Key: HHH-3162
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3162
Project: Hibernate3
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