I am trying to retrieve the current value of a sequence. I tried setting
the sequence up as a table with currval('my_sequence') as a column
<class-descriptor class="org.mff.web.db.MySeqDb"
table="my_seq">
<field-descriptor
name="currval"
column="currval('my_seq')"
jdbc-type="BIGINT"
/>
</class-descriptor>
Criteria criteria = new Criteria();
QueryByCriteria query = new QueryByCriteria(MySeqDb.class, criteria);
MySeqDb ms_db=(MySeqDb)broker.getObjectByQuery(query);
System.out.println("My Seq current val: "+ms_db.getCurrval());
But this give me: org.postgresql.util.PSQLException: ERROR: schema "a0"
does not exist
Is there some proper way to make these kind of queries other than this
kludge (that doesn't work anyway)?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]