ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: Possible wrong behavior in ibatis?
Date Mon, 03 Jul 2006 05:39:57 GMT
It's odd to me that setPerson(Person) doesn't work -- that would be a bug.

What is the error you're getting (stack trace)?

(As for the "second" -- you can't have overloaded setters, as it violates
the JavaBeans spec and stops your beans from working with many tools,
including ibatis)


On 7/2/06, Paul Benedict <paul4christ79@yahoo.com> wrote:
> In my opinion, I came across an unexpected behavior in ibatis. I am pretty
> confident this a bug, but I want to get other people's opinion.
> Here's my scenario:
> 1) My class PersonImpl is an implementation of the Person interface.
> 2) An instance of PersonImpl is injected into User.
> 3) An ibatis result map creates a User, a PersonImpl, and sets the
> PersonImpl into User.
> I have two problems with #3.
> First, ibatis forces me to have an explicit setPerson(PersonImpl) -- my
> setPerson(Person) will not do. Doh! This is peculiar. I believe ibatis
> should inspect the interfaces of PersonImpl and see if it can match up any
> interfaces with the setters.
> Second, I added my explicit setPerson(PersonImpl). That should work,
> right? Well it doesn't because I still require the overloaded
> setPerson(Person), and ibatis finds that first and complains about "no
> WRITABLE property" existing.
> How do I overcome this problem?
> Paul
> ------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
> starting at 1ยข/min.
> <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com>

View raw message