Basically, if I use the org.hibernate.annotations.CollectionId annotation, for some reason, hibernate won't generate the table for the mapping.
This works:
Code:
@CollectionOfElements
@JoinTable(
name = "contact",
joinColumns = @JoinColumn(name = "n_key_person"))
@IndexColumn(name = "n_index_order")
This doesn't:
Code:
@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.
Any ideas?
Should I raise a Jira issue?
(It's a Spring-managed JPA-style application, by the way)
Hibernate version: 3.2.5 GA
Hibernate Annotations version: 3.3.0 GA