简体   繁体   中英

How to store Arraylist data in postgresql

I am trying to write Arraylist<String> to postgresql. but getting below error.

ERROR: column "data" is of type character varying[] but expression is of type bytea
  Hint: You will need to rewrite or cast the expression.

If someone knows which data type i should use for column to store arraylist content in postgresql?

Thanks

Are you using JPA, Spring Data?

Have you looked up for @ElementCollection ? I think it's gonna be helpful.

Java JPA ElementCollection Doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM