java - ActiveJDBC: integer[] on PostgreSQL with multiple schemas in one DB -
i trying use activejdbc
convert integer[]
postgresql
database java equivalent int[]
. fetch done properly, object returned weblogic.jdbc.wrapper.array_org_postgresql_jdbc_pgarray
. have yet find way convert that.
i have tried 2 different ways of accessing data:
first, using standard record.findfirst("id = ?", id)
format. because have multiple schemas in database, added @table
notation model.
second, tried doing record.findbysql("select array record id = ?", id)
. tried array::integer[]
.
each time pgarray type. have searched way convert type else use, nothing has worked.
is there way this? need use different way of data retrieval other activejdbc
?
jdbc defines java.sql.array
handle array typed columns. pgarray
postgres implementation of java.sql.array
.
given array object a
can call (integer[])a.getarray()
integer
array jdbc array object (if jdbc driver has decided return integer
objects , not other numbers
). helper method extract value , convert int[]
idea.
don't know if activejdbc has support conversion behind scenes.
Comments
Post a Comment