-->
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.  [ 2 posts ] 
Author Message
 Post subject: Using @CollectionId annotation breaks schema generation
PostPosted: Tue Oct 09, 2007 10:49 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
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

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 3:12 am 
Newbie

Joined: Wed Mar 05, 2008 3:11 am
Posts: 3
Has anyone got any ideas on this problem?

I've raised a JIRA here
http://opensource.atlassian.com/projects/hibernate/browse/ANN-701


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.