...try just running queryForList to see what you get back. That will help you determine why you're getting multiple rows back.
Clinton
On 5/7/05, Brian Beaulieu <[EMAIL PROTECTED]> wrote:
I can not seem to get around this error:
java.sql.SQLException: Error: executeQueryForObject returned too many
results.
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForO
bject(GeneralStatement.java:104)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapEx
ecutorDelegate.java:561)
...
I'm just getting started with iBATIS and therefore not doing anything
complex.
Here's some info:
Using PostgreSQL 8 with JDBC v3 driver
Selecting 2 columns, 'customer_id' and 'company', customer_id is a serial
and company is text.
<select id="getCustomer" parameterClass="int"
resultClass="net.ci.biz.Customer">
SELECT * from customer where customer_id = #value#
</select>
That query works fine..
<select id="getCustomers" resultClass=" java.util.HashMap">
SELECT customer_id,company FROM CUSTOMER
</select>
This one returns the error.. I've tried using explicity resultMaps .. Same
problem
Any ideas? Could it be this newer JDBC driver?
I've searched online, mailing lists, wiki, faq, docs, etc..
Thanks!
Brian
--
---------------------[ Ciphire Signature ]----------------------
From: [EMAIL PROTECTED] signed email body (936 characters)
Date: on 07 May 2005 at 20:57:03 UTC
To: ibatis-user-java@incubator.apache.org
----------------------------------------------------------------
: Ciphire has secured this email against identity theft.
: Free download at www.ciphire.com. The garbled lines
: below are the sender's verifiable digital signature.
----------------------------------------------------------------
00fAAAAAEAAACfK31CqAMAALECAAIAAgACACBzM1QacHMWU6J0YX+gvNWvLaffTU
jA90H3gKPnRnGGegEAhGATdFF1YNTXlLvKaOvXtndKrxt6WnleaxwaDvLUthCAkO
vIuyq2oYqaEA5c7HZpfLGs2u/4hAT1BuxbNpRvFg==
------------------[ End Ciphire Signed Message ]----------------