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')
Hi Rick,
I never tried this before with OJB.
Think PostgreSQL expects something like
select currval 'my_seq'
So the easiest way will be a plain sql-query within OJB
http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A
The problem with your mapping can
Thanks. The plain sql-query works.
note: It throws an error if I close the connection: con.close(); Does
OJB to take care of this?
Armin Waibel wrote:
Hi Rick,
I never tried this before with OJB.
Think PostgreSQL expects something like
select currval 'my_seq'
So the easiest way will be