quarkus-hibernate-types

Hibernate types for the Quarkus framework

License

License

Categories

Categories

Quarkus Container Microservices Hibernate Data ORM
GroupId

GroupId

org.lorislab.quarkus
ArtifactId

ArtifactId

quarkus-hibernate-types
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

quarkus-hibernate-types
Hibernate types for the Quarkus framework
Project Organization

Project Organization

lorislab

Download quarkus-hibernate-types

How to add to project

<!-- https://jarcasting.com/artifacts/org.lorislab.quarkus/quarkus-hibernate-types/ -->
<dependency>
    <groupId>org.lorislab.quarkus</groupId>
    <artifactId>quarkus-hibernate-types</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.lorislab.quarkus/quarkus-hibernate-types/
implementation 'org.lorislab.quarkus:quarkus-hibernate-types:0.2.0'
// https://jarcasting.com/artifacts/org.lorislab.quarkus/quarkus-hibernate-types/
implementation ("org.lorislab.quarkus:quarkus-hibernate-types:0.2.0")
'org.lorislab.quarkus:quarkus-hibernate-types:jar:0.2.0'
<dependency org="org.lorislab.quarkus" name="quarkus-hibernate-types" rev="0.2.0">
  <artifact name="quarkus-hibernate-types" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.lorislab.quarkus', module='quarkus-hibernate-types', version='0.2.0')
)
libraryDependencies += "org.lorislab.quarkus" % "quarkus-hibernate-types" % "0.2.0"
[org.lorislab.quarkus/quarkus-hibernate-types "0.2.0"]

Dependencies

compile (3)

Group / Artifact Type Version
io.quarkus : quarkus-core jar
io.quarkus : quarkus-hibernate-orm jar
io.quarkus : quarkus-jackson jar

Project Modules

There are no modules declared in this project.

quarkus-hibernate-types

License GitHub Workflow Status (branch) GitHub tag (latest SemVer) Maven Central

This Quarkus Hibernate types extension is based on the https://github.com/vladmihalcea/hibernate-types.

Changes:

  • remove unused methods
  • inject ObjectMapper from Arc container
  • defined String constants for JSON types.
  • remove hibernate clone method and reflection for the native image.

How to

Quarkus Hibernate types

  • JSON

Add this maven dependency to you project.

<dependency>
    <groupId>org.lorislab.quarkus</groupId>
    <artifactId>quarkus-hibernate-types</artifactId>
    <version>0.1.1</version>
</dependency>

Add the @TypeDef annotation to your entity class and to entity field @Type annotation.

import org.lorislab.quarkus.hibernate.types.json.JsonBinaryType;
import org.lorislab.quarkus.hibernate.types.json.JsonTypes;
import javax.persistence.*;

@TypeDef(name = JsonTypes.JSON_BIN, typeClass = JsonBinaryType.class)
@Entity
public class Data {

    @Type(type = JsonTypes.JSON_BIN)
    @Column(columnDefinition = JsonTypes.JSON_BIN)
    private Parameters data = new Parameters();

}

Current implemented JSON types

Name Value typeClass
JsonTypes.JSON_STRING json JsonStringType.class
JsonTypes.JSON_BIN jsonb JsonBinaryType.class
JsonTypes.JSON_BLOB jsonb-lob JsonBlobType.class
JsonTypes.JSON_NODE_STRING jsonb-node JsonNodeStringType.class
JsonTypes.JSON_NODE_BIN jsonb-node JsonNodeBinaryType.class

Create a release

mvn semver-release:release-create

Create a patch branch

mvn semver-release:patch-create -DpatchVersion=x.x.0
org.lorislab.quarkus

lorislab

Versions

Version
0.2.0
0.1.2