All Projects → hibernate → Hibernate Orm

hibernate / Hibernate Orm

Hibernate's core Object/Relational Mapping functionality

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Hibernate Orm

Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (-2.31%)
Mutual labels:  orm, hibernate, jdbc, jpa, database
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (-98.11%)
Mutual labels:  orm, hibernate, jdbc, jpa
Hunt Entity
An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.
Stars: ✭ 51 (-98.94%)
Mutual labels:  orm, hibernate, jpa, database
Ebean
Ebean ORM
Stars: ✭ 1,172 (-75.61%)
Mutual labels:  orm, jdbc, jpa, database
Micronaut Data
Ahead of Time Data Repositories
Stars: ✭ 352 (-92.68%)
Mutual labels:  hibernate, jdbc, jpa
Hibernate Performance
Samples for "Hibernate performance tuning" talk
Stars: ✭ 87 (-98.19%)
Mutual labels:  orm, hibernate, jpa
Hibernate Basics
Samples for "Hibernate, how the magic is really done?" talk
Stars: ✭ 44 (-99.08%)
Mutual labels:  orm, hibernate, jpa
Hibernate Reactive
A reactive API for Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.
Stars: ✭ 167 (-96.53%)
Mutual labels:  orm, hibernate, jpa
Spring Kotlin Exposed
playground for spring-boot 2.*, kotlin , jetbrains-exposed, postgres, jsonb, flyway, docker
Stars: ✭ 106 (-97.79%)
Mutual labels:  orm, hibernate, jpa
Ormlite Jdbc
ORMLite JDBC functionality that works with JDBC drivers to attach to various database types
Stars: ✭ 184 (-96.17%)
Mutual labels:  orm, jdbc, database
Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (-94.96%)
Mutual labels:  orm, jdbc, database
Restfeel
RESTFeel: 一个企业级的API管理&测试平台。RESTFeel帮助你设计、开发、测试您的API。
Stars: ✭ 59 (-98.77%)
Mutual labels:  gradle, jpa, database
Jeddict
Jakarta EE 8 (Java EE) & MicroProfile 3.2 application generator and modeler
Stars: ✭ 358 (-92.55%)
Mutual labels:  orm, hibernate, jpa
Query Validator
Compile time validation for HQL and JPQL queries in Java code
Stars: ✭ 70 (-98.54%)
Mutual labels:  orm, hibernate, jpa
MiniDao
An powerful enhanced toolkit of SpringJdbc for simplify development
Stars: ✭ 200 (-95.84%)
Mutual labels:  jdbc, jpa, hibernate
Norm
Access a database in one line of code.
Stars: ✭ 152 (-96.84%)
Mutual labels:  orm, jdbc, database
Spring Boot 2 Oauth2 Authorization Jwt
Spring Boot 2 OAuth2 JWT Authorization server implementation with Database for Users and Clients (JPA, Hibernate, MySQL)
Stars: ✭ 115 (-97.61%)
Mutual labels:  hibernate, jpa, database
Minidao
轻量级JAVA持久层,类似Mybatis一样的用法,基于SpringJdbc实现更轻量
Stars: ✭ 177 (-96.32%)
Mutual labels:  hibernate, jdbc, jpa
Quickperf
QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
Stars: ✭ 231 (-95.19%)
Mutual labels:  orm, hibernate, jdbc
Sample Boot Hibernate
Spring Boot + JPA ( Hibernate ) + Java8 [ DDD Sample ]
Stars: ✭ 97 (-97.98%)
Mutual labels:  gradle, hibernate, jpa

Hibernate ORM is a library providing Object/Relational Mapping (ORM) support to applications, libraries, and frameworks.

It also provides an implementation of the JPA specification, which is the standard Java specification for ORM.

This is the repository of its source code; see Hibernate.org for additional information.

Build Status Language grade: Java

Continuous Integration

Hibernate uses both Jenkins and GitHub Actions for its CI needs. See

Building from sources

The build requires at least Java 11 JDK.

Hibernate uses Gradle as its build tool. See the Gradle Primer section below if you are new to Gradle.

Contributors should read the Contributing Guide.

See the guides for setting up IntelliJ or Eclipse as your development environment.

Gradle Primer

The Gradle build tool has amazing documentation. 2 in particular that are indispensable:

  • Gradle User Guide is a typical user guide in that it follows a topical approach to describing all of the capabilities of Gradle.

  • Gradle DSL Guide is unique and excellent in quickly getting up to speed on certain aspects of Gradle.

We will cover the basics developers and contributors new to Gradle need to know to get productive quickly.

Note
The project defines a Gradle Wrapper. The rest of the section will assume execution through the wrapper.

Executing Tasks

Gradle uses the concept of build tasks (equivalent to Ant targets or Maven phases/goals). You can get a list of available tasks via

gradle tasks

To execute a task across all modules, simply perform that task from the root directory. Gradle will visit each sub-project and execute that task if the sub-project defines it. To execute a task in a specific module you can either:

  1. cd into that module directory and execute the task

  2. name the "task path". For example, to run the tests for the hibernate-core module from the root directory you could say gradle hibernate-core:test

Common tasks

The common tasks you might use in building Hibernate include:

  • build - Assembles (jars) and tests this project

  • compile - Performs all compilation tasks including staging resources from both main and test

  • jar - Generates a jar archive with all the compiled classes

  • test - Runs the tests

  • publishToMavenLocal - Installs the project jar to your local maven cache (aka ~/.m2/repository). Note that Gradle never uses this, but it can be useful for testing your build with other local Maven-based builds.

  • clean - Cleans the build directory

Testing and databases

Testing against a specific database can be achieved in 2 different ways:

Using the "Matrix Testing Plugin" for Gradle.

Coming later…

Using "profiles"

The Hibernate build defines several database testing "profiles" in databases.gradle. These profiles can be activated by name using the db build property which can be passed either as a JVM system prop (-D) or as a Gradle project property (-P). Examples below use the Gradle project property approach.

gradle clean build -Pdb=pgsql

To run a test from your IDE, you need to ensure the property expansions happen. Use the following command:

gradle clean compile -Pdb=pgsql

NOTE: If you are running tests against a JDBC driver that is not available via Maven central be sure to add these drivers to your local Maven repo cache (~/.m2/repository) or (better) add it to a personal Maven repo server

Running database-specific tests from the IDE using "profiles"

You can run any test on any particular database that is configured in a databases.gradle profile.

All you have to do is run the following command:

gradlew setDataBase -Pdb=pgsql

or you can use the shortcut version:

gradlew sDB -Pdb=pgsql

You can do this from the module which you are interested in testing or from the hibernate-orm root folder.

Afterward, just pick any test from the IDE and run it as usual. Hibernate will pick the database configuration from the hibernate.properties file that was set up by the setDataBase Gradle task.

Starting test databases locally as docker containers

You don’t have to install all databases locally to be able to test against them in case you have docker available. The script docker_db.sh allows you to start a pre-configured database which can be used for testing.

All you have to do is run the following command:

./docker_db.sh postgresql_9_5

omitting the argument will print a list of possible options.

When the database is properly started, you can run tests with special profiles that are suffixed with _ci e.g. pgsql_ci for PostgreSQL. By using the system property dbHost you can configure the IP address of your docker host.

The command for running tests could look like the following:

gradlew test -Pdb=pgsql_ci "-DdbHost=192.168.99.100"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].