0

how to persist string array in a row using JPA ?

I have tried with couple of open source dependency even tat's not working , let if you have any approaches to get this done .

1
  • If the database supports arrays (like PostgreSQL), you can use this library without any special modifications to your code, other than the columnDefinition if you use Hibernate to maintain the table structure, rather than doing it manually (much safer). Commented Dec 3, 2018 at 14:39

1 Answer 1

1

Check @Converter from jpa. You need to create convert and unconvert methods for your custome converter. Something like this http://hantsy.blogspot.com/2013/12/jpa-21-attribute-converter.html?m=1

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.