Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes Annotation dilema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Annotation dilema" Watch "Annotation dilema" New topic
Author

Annotation dilema

camelia codarcea
Ranch Hand

Joined: May 08, 2007
Posts: 36
hello,

I am reading about annotations, and I can't figure out the difference between EJB3 annotations, Hibernate annotations and JDK5 annotations.
All three have the same tags: @Id, @one-to-many etc
Can anyone explain to me, or is there a good tutorial about annotations ?

thank you


SCJP 5.0 .... 97%
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I don't recall a JDK 5 Annotation @Id. But that doesn't matter Annotations are actually still class, and classes that can have the same name, but in different packages.

So there could be an @Id that is in a JDK package and one in the JPA package and even a seperate one in Hibernate. But the Hibernate and JPA annotations should be one and the same and in the same package, because Hibernate implements the JPA Specification. Just to claify I am using the JPA name instead of EJB3, because those EJB3 annotations you mentioned are part of the JPA spec which is included under EJB3.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Annotation dilema
 
Similar Threads
Annotations necessary for SCBCD latest version
need to create a Navagation Button control using Annotation
For SCBCD5.0 (on EJB3.0) is experience on JDK1.5 needed?
Welcome Herbert Schildt!
Hibernate Doesnot generate Annotation