Hands-On Cloud-Native Applications with Java and Quarkus by Francesco Marchioni
Author:Francesco Marchioni [Francesco Marchioni]
Language: eng
Format: epub
Tags: COM060180 - COMPUTERS / Web / Web Services and APIs, COM051280 - COMPUTERS / Programming Languages / Java, COM048000 - COMPUTERS / Systems Architecture / Distributed Systems and Computing
Publisher: Packt Publishing
Published: 2019-12-13T09:01:51+00:00
Hibernate ORM is the standard way to map database structures into Java objects. The main downside of using an ORM tool is that even a simple database structure requires lots of boilerplate code (such as getter and setters methods). Also, you have to include basic query methods in your repository classes, which makes the work quite repetitive. In this section, we will learn how to use Hibernate Panache to simplify and accelerate the development of our applications.
To get started with Hibernate ORM with Panache, let's check the second example for this chapter, which is located in the Chapter05/hibernate-panache folder in this book's GitHub repository. We recommend importing the project into your IDE before you move on.
If you take a look at the project's configuration, you will see that we have included quarkus-hibernate-orm-panache in the pom.xml file:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache</artifactId>
</dependency>
This is the only configuration that we need to use Hibernate Panache. Now comes the funny part. There are two strategies for plugging Panache into your entity:
Extending the io.quarkus.hibernate.orm.panache.PanacheEntity class: This is the simplest option as you will get an ID field that is auto-generated.
Extending io.quarkus.hibernate.orm.panache.PanacheEntityBase: This option can be used if you require a custom ID strategy.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8295)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7778)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6823)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6553)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6419)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Kotlin in Action by Dmitry Jemerov(5062)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4316)
Functional Programming in JavaScript by Mantyla Dan(4038)
Solidity Programming Essentials by Ritesh Modi(3994)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3785)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3729)
The Ultimate iOS Interview Playbook by Avi Tsadok(3704)
