ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mithun Ruikar" <mithun.rui...@gmail.com>
Subject Selecting subset of column
Date Tue, 13 Jun 2006 03:41:05 GMT
Hello,
I have resultmap mapping columns of one table to one bean.
But i want to add select statement to get next sequence number.

SELECT TO_CHAR(SYSDATE, 'YYYYMMDD') || LPAD(SEQ.NEXTVAL, 12, '0')
TABLE_ID FROM DUAL

this returns me next sequence number as value of one column named
TABLE_ID which is one of column of my table whose columns i have
mapped in resultmap to bean.

So when i use sqlMap.queryForObject(ID, null, new BeanMapped());
should it return me BeanMapped with field tableId set to next sequence number?
Because currently it is returning null.

Thank you,
-- Mithun

Mime
View raw message