ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kezerashvili, Denis" <Denis.Kezerashv...@gs.com>
Subject RE: Problem exposing protected setters for iBatis
Date Mon, 12 May 2008 13:53:11 GMT
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

View raw message