@Entity
@Table(name = "profiles")
data class Profile(
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(
name = "UUID",
strategy = "org.hibernate.id.UUIDGenerator"
)
@Column(name = "id", updatable = false, nullable = false)
val id: UUID,
@Column(name = "first_name")
var firstName: String? = null,
@Column(name = "last_name")
var lastName: String? = null,
@Column(name = "phones")
var phones: String? = null
}
In Postgres has table profiles and has column 'phones' => character varying[] (Array) How can I set type to update and insert datas?
I have errors if I set List<> or Array<> ArrayList<> :
org.postgresql.util.PSQLException: ERROR: column "phones" is of type character varying[] but expression is of type character varying
Hint: You will need to rewrite or cast the expression.