Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Is <class> element in persistence.xml necessary?  RSS feed

 
Ranch Hand
Posts: 1733
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In 8.2.1.6.4 List of Managed Classes


A list of named managed persistence classes may be specified instead of or in addition to the JAR files and mapping files. Any  mapping metadata annotation found on these classes will be  processed, or they will be mapped using the mapping annotation defaults. The class element is used to list a managed persistence class.


With JPA 2.0, we can use @Entity to specify managed persistence class or by using <Entity> in orm.xml
Is this <class> element of <persistence-unit> necessary?

 
Creator of Enthuware JWS+ V6
Posts: 3274
296
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is this <class> element of <persistence-unit> necessary?  


No, unless you have a Java SE application.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!