ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reuben Firmin" <Reuben.Fir...@Copart.Com>
Subject cannot write to property without a setter
Date Tue, 06 Feb 2007 18:01:43 GMT
Let's say I have a class structure as per below. Ibatis doesl not seem to let me address the
path foo.bah.someProperty, because there is no setter (Foo#setBah). Specifically, I get "com.ibatis.common.beans.ProbeException:
There is no WRITEABLE property". Spring, on the other hand, is fine with this particular setup,
and in fact seems to ignore the setBah() method if it exists. Is there a good argument for
one way or the other? 

public class Foo 
{
    private Bah bah;

    public Foo()
    {
        bah = new Bah();
    }

    public Bah getBah()
    {
        return bah;
    }
}

public class Bah
{
    private int someProperty;
 
    public int getSomeProperty()
    ...

    public void setSomeProperty(int someProperty)
    ...
}

Mime
View raw message