Worry not, I don't see us changing this anytime soon, especially given that there's already a workaround and common behavior with other frameworks. It's still worth a feature request in Jira though. Here's a post that just came up today regarding JPA and the same discussion.
http://java.dzone.com/articles/jpa-implementation-patterns-7 Clinton On Tue, Sep 8, 2009 at 8:16 AM, Gustavo Henrique Sberze Ribas < gri...@cpqd.com.br> wrote: > > Does anyone actually care if iBATIS uses getter/setters instead of > fields directly? > > I don't care, as long as it keeps support to java beans > getters/setters or implement some sort of column to method mapping like > Brandon suggested. > > We have a special float point data array stored as a blob in the > database. We then take advantage of iBATIS getters/setters support to do > the conversion. Here's an example: > > > public class JBean { > > private float[] dataPoints; > > // Used only by iBATIS > protected byte[] getPointsAsByteStream() { > // uncanny reconversion > ... > } > > // Used only by iBATIS > protected void setPointsAsByteStream(byte[] points) { > // uncanny conversion > ... > } > > // Used by all others > public float[] getDataPoints() { return dataPoints; } > public void setDataPoints(float[] points) { this.dataPoints = points; > } > } > > <resultMap class="JBean" id="jbeanResultMap"> > <result property="pointsAsByteStream" column="POINTS" > jdbcType="BLOB" /> > </resultMap> > > > Regards, > Gustavo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > >