Giter Site home page Giter Site logo

vandorpedavid / hibernate-types Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vladmihalcea/hypersistence-utils

0.0 1.0 0.0 1.23 MB

The Hibernate Types library gives you extra types that are not supported by the Hibernate ORM core.

License: Apache License 2.0

Java 99.98% Batchfile 0.02%

hibernate-types's Introduction

License Maven Central JavaDoc

Introduction

The Hibernate Types repository gives you extra types and general purpose utilities that are not supported by the Hibernate ORM core.

The main advantage of this project is that it supports a broad range of Hibernate versions, spanning from Hibernate 4.1 to Hibernate 5.4.

Features

JSON

Best Practices

When mapping a JSON column type to a List<POJO> or Map<String, POJO>, you need to make sure that the POJO type overrides the default equals and hashCode methods and implements them according to the JSON object content.

Otherwise, the Hibernate dirty checking mechanism may trigger unexpected UPDATE statements. Check out the #134 issue for more details.

Oracle

You should use the JsonStringType to map a VARCHAR2 column type storing JSON.

You should use the JsonBlobType to map a BLOB column type storing JSON.

For more details, check out this article.

SQL Server

You should use this JsonStringType to map an NVARCHAR column type storing JSON.

For more details, check out this article.

PostgreSQL

You should use this JsonBinaryType to map both jsonb and json column types.

For more details, check out this article.

MySQL

You should use this JsonStringType to map the json column type.

For more details, check out this article.

JSON mapping examples

ARRAY

PostgreSQL Types (e.g. ENUM, INET, HSTORE, RANGE)

Generic Types

Utilities

Naming Strategy
DTO Projection and ResultTransformer

Installation

Depending on the Hibernate version you are using, you need to add the following dependency:

Hibernate 5.5

<dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-55</artifactId>
    <version>2.12.0</version>
</dependency>

Hibernate 5.4, 5.3 and 5.2

<dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-52</artifactId>
    <version>2.12.0</version>
</dependency>

Hibernate 5.1 and 5.0

<dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-5</artifactId>
    <version>2.12.0</version>
</dependency>

Hibernate 4.3

<dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-43</artifactId>
    <version>2.12.0</version>
</dependency>

Hibernate 4.2 and 4.1

<dependency>
    <groupId>com.vladmihalcea</groupId>
    <artifactId>hibernate-types-4</artifactId>
    <version>2.12.0</version>
</dependency>

Requirements

  • Java version supported by the Hibernate ORM version you are using.
  • SLF4J
  • Jackson Databind

Issue management

If you have an issue, then there are two ways to address it.

Option 1: Providing your own fix

This project being open-source, you have the ability of fixing any issue. So, in this case, this is what you need to do:

  1. Provide a replicating test case using the existing test cases as a template
  2. Provide a fix proposal
  3. Send a Pull Request with the fix proposal and the test case

Option 2: Paid support

If you don't have the time to provide a fix, the I could fix your issue via consulting.

Are you struggling with application performance issues?

Hypersistence Optimizer

Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. No more performance issues, no more having to spend countless hours trying to figure out why your application is barely crawling.

Imagine discovering early during the development cycle that you are using suboptimal mappings and entity relationships or that you are missing performance-related settings.

More, with Hypersistence Optimizer, you can detect all such issues during testing and make sure you don't deploy to production a change that will affect data access layer performance.

Hypersistence Optimizer is the tool you've been long waiting for!

Training

If you are interested in on-site training, I can offer you my High-Performance Java Persistence training, which can be adapted to one, two or three days of sessions. For more details, check out my website.

Consulting

If you want me to review your application and provide insight into how you can optimize it to run faster, then check out my consulting page.

High-Performance Java Persistence Video Courses

If you want the fastest way to learn how to speed up a Java database application, then you should definitely enroll in my High-Performance Java Persistence video courses.

High-Performance Java Persistence Book

Or, if you prefer reading books, you are going to love my High-Performance Java Persistence book as well.

High-Performance Java Persistence book High-Performance Java Persistence video course

hibernate-types's People

Contributors

vladmihalcea avatar jwgmeligmeyling avatar nkonev avatar nstdio avatar dreis2211 avatar pedroxs avatar joshiste avatar postremus avatar simon-mottram-cucumber avatar dependabot[bot] avatar pavelgordon avatar azell avatar andyflury avatar neetkee avatar charllie avatar cosminseceleanu avatar dimalu85 avatar frode-carlsen avatar jones-gareth avatar lion7 avatar jeetchoudhary avatar jbpayne avatar lounagen avatar lborie avatar marceloverdijk avatar eiselems avatar michael-simons avatar mkobel avatar pmclaren avatar rieckpil avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.