You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Mithun Ruikar <mi...@gmail.com> on 2006/06/13 05:41:05 UTC

Selecting subset of column

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