Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Tips: stored procs  RSS feed

 
Chris Thompson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll queue up a softball.  Stored procs exist, and JPA 2.1 add first class support via @NamedStoredProcedureQuery.

As an aside, the promotional pricing of $2.99 for the Kindle version of the book on Amazon is a great deal.

Thanks for including these tips:  How to map an enum to a column and How to use a generated UUID as a primary key.
 
Chris Thompson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgot my own question. Are you still seeing new implementations leverage this -- obviously could -- or are folks mostly using as a bridge during application modernization initiatives?  I was surprised to see that beefed up with 2.1.
 
Thorben Janssen
Author & Course Creator
Ranch Hand
Posts: 92
5
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris,

stored procedures are still used. Databases handle large datasets very efficiently. So it can make sense to use a stored procedure to perform a very data-heavy operation which just returns the result instead of selecting thousands of records and processing them in the Java tier.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!