CREATE TYPE and Java Mapping

From: aleksvp <aleksvp(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: CREATE TYPE and Java Mapping
Date: 2011-01-19 13:51:31
Message-ID: 1295445091997-3347859.post@n5.nabble.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Hi,
I have a procedure that returns values of a TYPE (created via CREATE TYPE).
I'm having trouble mapping the return to a Java type.

I'm trying to call it like anyother procedure:
Query qry = null;
List<Struct> results= new ArrayList<Struct>();
Object[] resultado = null;
String sql = "select procedure(parameters);";
qry = em.createNativeQuery(sql);
results= qry.getResultList();

I'm getting a no dialect mapping exception.

Also, I've tried to map a Entity to the type. But when I try to get the
result I got an error on the fields mapping.

Regards.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/CREATE-TYPE-and-Java-Mapping-tp3347859p3347859.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Maciek Sakrejda 2011-01-19 17:32:12 Re: jdbc spec violation for autocommit=true & addbatch/executeBatch
Previous Message Vitalii Tymchyshyn 2011-01-19 09:49:59 Re: jdbc spec violation for autocommit=true & addbatch/executeBatch