cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mr.abanjo" <mr.aba...@gmail.com>
Subject Cayenne with Postgress : how to get data from cursor
Date Mon, 09 Sep 2013 13:03:40 GMT
Hi all,
we need to switch the database from Oracle to Postgres.
Our implementation use Cayenne to map a store procedure that return single
type data and a cursor.
With single type data ( number, varchar  .... ) there's no problem. All
works fine.
The problem happens when we try to get data from a cursor. We mapped it in
data-map xml file as "OTHER". When we execute it the cursor is empty ( but
it must have a list of elements ).

We suppose that the "missing" part for Postgress is this one :

Procedure proc = getProcedure();
Iterator it = proc.getCallOutParameters().iterator();
while (it.hasNext()) {
         ProcedureParameter param = (ProcedureParameter) it.next();
          if (param.getType() == Types.OTHER) {
                  param.setType(OracleAdapter.getOracleCursorType());
           }
}

With Oracle we set the OTHER parameter type as "OracleCursorType". There is
a corresponding type for Postgress?
Maybe this is the problem, maybe no ... someone have any idea?

Thanks!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message