All Projects → vladmihalcea → Hibernate Types

vladmihalcea / Hibernate Types

Licence: apache-2.0
The Hibernate Types library gives you extra types that are not supported by the Hibernate ORM core.

Programming Languages

java
68154 projects - #9 most used programming language
enum
40 projects

Projects that are alternatives of or similar to Hibernate Types

Csmodel
CSModel is a concise and efficient model framework for iOS/OSX, and provides nested Model to compare values and copy values.
Stars: ✭ 192 (-82.89%)
Mutual labels:  array, json
Mjextension
A fast, convenient and nonintrusive conversion framework between JSON and model. Your model class doesn't need to extend any base class. You don't need to modify any model file.
Stars: ✭ 8,458 (+653.83%)
Mutual labels:  array, json
Uxdm
🔀 UXDM helps developers migrate data from one system or format to another.
Stars: ✭ 159 (-85.83%)
Mutual labels:  array, json
Core
Elm's core libraries
Stars: ✭ 2,634 (+134.76%)
Mutual labels:  array, json
Vscode Data Preview
Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
Stars: ✭ 245 (-78.16%)
Mutual labels:  array, json
Mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
Stars: ✭ 321 (-71.39%)
Mutual labels:  array, json
Swift Utils
A collection of handy swift utils
Stars: ✭ 253 (-77.45%)
Mutual labels:  array, json
Kakajson
Fast conversion between JSON and model in Swift.
Stars: ✭ 867 (-22.73%)
Mutual labels:  array, json
Re Txt
converts text-formats from one to another, it is very useful if you want to re-format a json file to yaml, toml to yaml, csv to yaml, ... etc
Stars: ✭ 59 (-94.74%)
Mutual labels:  json
Njson
Unmarshal/Decode nested JSON by JSON Path
Stars: ✭ 61 (-94.56%)
Mutual labels:  json
Array Sort
Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.
Stars: ✭ 58 (-94.83%)
Mutual labels:  array
Jsonschema Key Compression
Compress json-data based on its json-schema while still having valid json
Stars: ✭ 59 (-94.74%)
Mutual labels:  json
Gophergameserver
🏆 Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
Stars: ✭ 61 (-94.56%)
Mutual labels:  json
Array view
Wrapper for references to array in C++.
Stars: ✭ 58 (-94.83%)
Mutual labels:  array
Ediengine
Simple .NET EDI X12 Reader, Writer and Validator. EDI JSON Serialization and Deserialization. Written in C#
Stars: ✭ 61 (-94.56%)
Mutual labels:  json
Cartesian Product
PHP - A simple, low-memory footprint function to generate all combinations from a multi-dimensionnal array.
Stars: ✭ 58 (-94.83%)
Mutual labels:  array
Ngx Excel Export
Angular6 application with export data to excel file functionality.
Stars: ✭ 58 (-94.83%)
Mutual labels:  json
Proposal Well Formed Stringify
Proposal to prevent JSON.stringify from returning ill-formed strings
Stars: ✭ 61 (-94.56%)
Mutual labels:  json
Cssparser.js
cssparser.js is a parser that generate json from css with matched orders & structures.
Stars: ✭ 61 (-94.56%)
Mutual labels:  json
Funcj
Assorted functional-oriented data structures and algorithms for Java.
Stars: ✭ 60 (-94.65%)
Mutual labels:  json

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

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

Installation

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

Hibernate 5.4, 5.3 and 5.2

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

Hibernate 5.1 and 5.0

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

Hibernate 4.3

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

Hibernate 4.2 and 4.1

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

Requirements

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

How to remove the Hypersistence banner from the log?

Why the Hypersistence banner?

Maintaining this project costs thousands of dollars per year, and, without the support of Hypersistence, this project would have been abandoned a very long time ago.

The reason why this banner was added is that, when I enabled GitHub donations, no one ever donated a single cent to support this project.

Luckily, there are better ways to support companies that build software that is used by hundreds of thousands of projects. So, if you like this framework, you are going to love optimizing your application using the amazing Hypersistence Optimizer tool.

Adding Hypersistence Optimizer to your project

Using Hibernate without Hypersistence Optimizer is not a good idea. To avoid risking application performance issues caused by improper usage of JPA and Hibernate configuration properties, mappings, or entity state changes, you should use Hypersistence Optimizer.

If you want to see why it's a bad idea to use JPA and Hibernate without a tool that inspects your mappings and configurations, check out this video presentation.

So, the easiest way to have the banner removed is to add Hypersistence Optimizer to your project.

Setting the hibernate.types.print.banner=false configuration setting

You can disable the banner by providing the hibernate.types.print.banner=false in either hibernate.properties or hibernate-types.properties file.

For Spring and Spring Boot, this Pull Request is needed to be integrated into Hibernate ORM.

Once this Pull Request is integrated, you could pass the hibernate.types.print.banner=false configuration property from the application.properties file.

So, in the meanwhile, you could vote for the HHH-14020 issue and remind the Hibernate team that you really need that Pull Request to be integrated. Hopefully, it will be added to the project sooner than later.

If can also provide the hibernate.types.print.banner=falsesetting as a Java System property when bootstrapping your Java application:

java -Dhibernate.types.print.banner=false -jar target/application-1.0.0.jar

Will I remove the banner?

Of course, I will. As soon as all the open issues are fixed, I'll remove the banner.

Or, if you want to fix those issues but don't have the time to do it, I totally understand that. I don't have the time to do it either. But, I could be paid to do that, and then, you could all benefit from those new features. If your company is interested in sponsoring the development of this project, don't hesitate to contact me.

If you're wondering why that banner was not removed by now, it's because donations and sponsoring don't really work for small projects like this one. Is that the true spirit of open-source software development?

Should you open a GitHub issue asking me to remove the banner?

Disabling this banner takes very little time, so there is no point in opening a GitHub issue to ask me to remove this banner, especially since there's already a pinned GitHub issue explaining how to remove it.

Keep in mind that all issues related to the banner removal will be deleted because GitHub issues are for technical features only (e.g., enhancements, bug fixing).

In case you think that the banner is unfair and disabling it is too much of an effort for you, then you can also fork the repository, remove the banner from the source code, build the project and use your own banner-free version. After all, this project is free as in Libre, so you're free to do that.

How to start the test environment

cd docker
docker-compose up -d

How to stop the test environment

cd docker
docker-compose down -v

How to get access to database logs

docker logs -f mysql-hibernate-types
docker logs -f postgresql-hibernate-types
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].