-->
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.  [ 7 posts ] 
Author Message
 Post subject: Still need hbm files if I use Hibernate annotations?
PostPosted: Tue Jun 27, 2006 12:48 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
Hi,

When we use Hibernate annotations, does that mean we don't need to create hbm files any more?

Please advise.
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 1:59 am 
Newbie

Joined: Sun Jun 04, 2006 4:19 pm
Posts: 9
Location: Germany
Yes, annotations "replace" mapping hbm files if you switch from Hibernate to JPA (EJB 3.0). Keep in mind that hbm files still have more features than the current JSR 220. But anyway, you can mix hbm and annotations if you need this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 4:13 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
Thanks for the info.

By the way, can you advise where can find what are the elements that I can specify for a particular annotations.

For example below (which I copy from somewhere):

@ManyToOne(optional=false)
@JoinColumn(name="CUST_ID", nullable=false, updatable=false)
public Customer getCustomer() { return customer; }


Where can I find out what are the element that I can specify for @JoinColumn besides name, nullable, updatable?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 5:24 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
API?
Java docs?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 5:47 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
Hi,

I check from the following API page but does not seem it to showing the list,
do you mean you seen it before?

http://java.sun.com/javaee/5/docs/api/javax/annotation/package-summary.html


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 5:51 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
http://java.sun.com/javaee/5/docs/api/j ... olumn.html


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 27, 2006 6:00 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
i see, thanks for your advice.


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