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 Paul Benedict <pa...@yahoo.com> on 2006/07/04 19:32:38 UTC

Can't find interface (was Re: Possible wrong behavior in ibatis?)

Clinton, I'll write up a class to demonstrate this and submit a JIRA ticket. If 2.2.0 hasn't rolled yet, it would be good to get in.

Clinton Begin <cl...@gmail.com> wrote: 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) 

Cheers,
Clinton

On 7/2/06, Paul Benedict <pa...@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. 



 

 		
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.