-->
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: Hibernate Annotation Reference incorrectness code?
PostPosted: Tue Apr 10, 2007 12:24 pm 
Newbie

Joined: Mon Apr 09, 2007 11:25 am
Posts: 3
Location: Korea
HI~I'm finded mistake in Hibernate Annotation Reference.

http://www.hibernate.org/hib_docs/annot ... ml#d0e1136

Code:
@Entity()
public class Flight implements Serializable {

    @ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
    @JoinTable(name="Flight_Company",
        joinColumns = @JoinColumn(name="FLIGHT_ID"),
        inverseJoinColumns = @JoinColumns(name="COMP_ID")

    )
    public Company getCompany() {
        return company;
    }
    ...
}


In Reference, Next code is incorrectness.

inverseJoinColumns = @JoinColumns(name="COMP_ID")

@JoinColumns annotation require array of @JoinColum. There is not directly used @JoinColumns annotation.(Maybe use, but more difficult)

I think to change this position.

inverseJoinColumns = {@JoinColumn(name = "COMP_ID")}

This code is my thinking, hence another possible.

thank you to response.

_________________
my blog is http://chanwook.tistory.com .
thank you~


Top
 Profile  
 
 Post subject: Re: Hibernate Annotation Reference incorrectness code
PostPosted: Tue Apr 10, 2007 12:27 pm 
Newbie

Joined: Mon Apr 09, 2007 11:25 am
Posts: 3
Location: Korea
thank you.

_________________
my blog is http://chanwook.tistory.com .
thank you~


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.