Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a new UserType to map jsonb columns #137

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

danicricco
Copy link

This new UserType allows the mapping of jsonb columns to jackson's
ObjectNode and JsonNode.

To use this class in the hbm mapping file you need to specify the type
and the sql-type:

<property name="ATTRIBUTE_NAME" type="org.jpos.ee.usertype.JsonbType">
    <column name="COLUMN_NAME" sql-type="jsonb" not-null="false"/>
</property>

This type was tested with postgres 9.5, 9.6, 10 and 11, with the current
hibernate version (5.4.6).

Signed-off-by: Arturo Volpe avolpe@fintech.works

This new UserType allows the mapping of jsonb columns to jackson's
ObjectNode and JsonNode.

To use this class in the hbm mapping file you need to specify the type
and the sql-type:

    <property name="ATTRIBUTE_NAME" type="org.jpos.ee.usertype.JsonbType">
        <column name="COLUMN_NAME" sql-type="jsonb" not-null="false"/>
    </property>

This type was tested with postgres 9.5, 9.6, 10 and 11, and with the
current hibernate version (5.4.6).

Signed-off-by: Arturo Volpe <avolpe@fintech.works>
@ar ar merged commit 7f85e8b into jpos:master Feb 20, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants