簡體   English   中英

如何在 postgresql 中存儲 Arraylist 數據

[英]How to store Arraylist data in postgresql

我正在嘗試將Arraylist<String>寫入 postgresql。 但低於錯誤。

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

如果有人知道我應該使用哪種數據類型作為列在 postgresql 中存儲數組列表內容?

謝謝

您在使用 JPA、Spring Data 嗎?

您是否查找過@ElementCollection 我認為它會有所幫助。

Java JPA ElementCollection 文檔

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM