The classes used in iBatis need to conform to the JavaBeans spec - they need to have a no-arg constructor.

If you really need to use the class with a string constructor, I'd suggest returning a Map from the sqlmap queryForObject method, then constructing your java object in your DAO.

Gareth.

----- Original Message ----
From: Anthony Hong <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, 12 September, 2006 12:51:13 AM
Subject: Re: How to use sqlmap to create an object with not empty construnctor

I use iBatis as my DAO Layer for now. It works fine with no-args
constructor class.
Then it can setter properties in result map.
But If I have a class without no-args constuctor, how to instantiate
in iBatis,  As there is a column in selection that can be used to pass
in constructor to create a new instance, how to achieve this goal.

Reply via email to