# How to create and use custom data types in hibernate

**URL:** <https://discourse.hibernate.org/t/how-to-create-and-use-custom-data-types-in-hibernate/318>\
**Category:** Hibernate ORM\
**Created:** [March 6, 2018, 11:00am UTC](https://discourse.hibernate.org/t/how-to-create-and-use-custom-data-types-in-hibernate/318 "2018-03-06T11:00:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshman0523](https://avatars.discourse-cdn.com/v4/letter/l/9de053/32.png) [@lakshman0523](https://discourse.hibernate.org/u/lakshman0523)\
**Post date:** [March 6, 2018, 11:00am UTC](https://discourse.hibernate.org/t/how-to-create-and-use-custom-data-types-in-hibernate/318/1 "2018-03-06T11:00:25Z")

</div>

In postgresql db column is declared as varchar[] how to map in jpa entity and by using entity how to save the values and how to get values. please help me out. thanks in advance.

---

<div class="post-metadata">

**Author:** ![gsmet](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/gsmet/32/9_2.png) [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Post date:** [March 7, 2018, 6:12pm UTC](https://discourse.hibernate.org/t/how-to-create-and-use-custom-data-types-in-hibernate/318/2 "2018-03-07T18:12:28Z")

</div>

I think you should take a look at the Hibernate Types project: [https://github.com/vladmihalcea/hibernate-types](https://github.com/vladmihalcea/hibernate-types).

AFAIK, it has support for PostgreSQL array mapping.
