What I do is that I have a base class (BaseDAOSqlMap) which encapsulates all my data access. In it are methods like getList(String,Object) which calls queryForList which allows me to define custom behavior of what getList() returns. That way if the implementation for queryForList() changes (I know its unlikely), I have to change my code in one place. Just a thought.

Zarar



----- Original Message ----- From: "Kinjal Sonpal" <[EMAIL PROTECTED]>
To: "iBatis mailing list" <[email protected]>
Sent: Wednesday, July 13, 2005 6:32 AM
Subject: queryForList not returning null


Dear All,

Today while using queryForList method, I realised that if there are no
records in the resultset, it returns an empty list unlike
queryForObject (which returns null). Is it an undocumented feature or
that's how it should have been?

After each call, I have to manually check for the size of the list.
Are there any known workarounds? Could not find much information over
the internet or ibatis website/lists.

Please advise.

Thanks and regards,
Kinjal



Reply via email to