Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JPA2 - what's new?

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike, Merrick and all in the forum,

I'm currently actively reading Pro EJB 3: Java Persistence API whilst studying towards SCBCD and just wanted to take this opportunity to thank you both for such a well written book. If your new Pro JPA 2: Mastering the Java Persistence API book is of a similar standard, I am sure it will be a great success.

The main question for me would be to ask what JPA2 gives me? What extra things can I now do? What things are simpler than in JPA? What issues are people finding in the field with JPA, and how does JPA2 aim to solve them?

Thanks,

MG
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article has a nice overview of what's new in JPA 2: http://java.sun.com/developer/technicalArticles/JavaEE/JavaEE6Overview_Part3.html
 
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,

The JPA 2.0 spec offers a lot of new flexibility that did not get included in the 1.0 spec. For example, there are many new advanced mapping types, particularly for mapping to legacy databases, there are now typed queries (so you don't have to cast the result), there is a whole new criteria API for people that want to create queries dynamically using a Java-based API instead of JP QL, and much more! If you haven't had to go outside the spec for any feature in 1.0 then you might not need to upgrade to 2.0, but if there was any time when you felt you were missing something then you might want to consider looking at 2.0.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is missing from JPA2? Any weak points or things that did not get into the spec but would be useful?
 
Mike Keith
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. If you ask 10 different people you will get 10 different answers about what is missing from the spec. In general, though, we are at the stage of specifying the corner cases of the technology (once again, one person's corner case is another's mainstay).

I have my own list of features that I am going to attempt to get standardized. I don't really want to to divulge them here, though, until the group begins meeting again for the next round and agrees that they are worth working on.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was looking at that article above, and I didn't see any mention on Cascade Option additions. Have they added something like DELETE-ORPHAN, or some other way to get that functionality?

Thanks

Mark
 
Mike Keith
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Spritzler wrote:I was looking at that article above, and I didn't see any mention on Cascade Option additions. Have they added something like DELETE-ORPHAN, or some other way to get that functionality?

Thanks

Mark



Yes, we added an orphanRemoval() element on the @OneToOne and @OneToMany annotations to provide that functionality.
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic