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: Problem exposing protected setters for iBatis
Date Mon, 12 May 2008 14:54:51 GMT
I think I've confirmed this bug visually.  It looks like a change went
in quite some time ago that stopped this from working.  I'll write a
few unit tests and see if we can get a fix into the next minor beta.
We have to re-release anyway, due to a JDK 1.4 incompatibility in the
most recent beta.


On Mon, May 12, 2008 at 7:53 AM, Kezerashvili, Denis
<Denis.Kezerashvili@gs.com> wrote:
> Thank you Koka for the link.
> I am actually well aware of the fact that iBATIS uses reflection to call
> setters. And yes it works fine with private setters. It also works fine with
> protected setters for the child classes in the same package. So if you have
> User class extending Entity class that has a protected void setId(); it will
> work for User class in iBATIS.
> The problem arises when your User class is NOT in the same package as your
> Entity class. Apparently the reflection calls are made on User class and for
> some reason it has no access to the setId() method inherited from the Entity
> class. If the reflection call was made on Entity instead it would've worked,
> but I do not think iBATIS is doing that. Or maybe it can do that, but it has
> to be configured somehow to make reflection calls on the parent class.
> Does anybody know how to do that, or if it's even possible?
> Any input would be greatly appreciated
>  ________________________________
>  From: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com]
> Sent: Friday, May 09, 2008 6:05 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Problem exposing protected setters for iBatis
> Well, here's thread discussing same problem, and it seems private setId()
> should work
> http://www.mail-archive.com/user-java@ibatis.apache.org/msg08629.html

View raw message