ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Sakharuk (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-301) The datetime database field mapped to wrong overloaded setters type String.
Date Wed, 31 May 2006 16:13:30 GMT
The datetime database field mapped to wrong overloaded setters type String.

         Key: IBATIS-301
         URL: http://issues.apache.org/jira/browse/IBATIS-301
     Project: iBatis for Java
        Type: Bug

 Environment: Apache Tomcat/5.5.12 - jdk1.5.0_04 Windows XP sybase 12 
    Reporter: Vladimir Sakharuk
    Priority: Minor

<select id="getFidInfo" resultClass="com.msci.fidindex.beans.myBean">
select * from table1 where myid=#myid#
I have around 10 nullable datetime fields in the table1 in sybase. There is no explicit mapping

I have follows 2 overloaded setters for each field:

public void setMoodysRatingDate(Date moodysRatingDate) {
	this.moodysRatingDate = moodysRatingDate;
public void setMoodysRatingDate(String value) {
	try { this.moodysRatingDate = sybasedate_format.parse(value);} catch (Exception ex){} ;

Surprisingly IBatis call setMoodysRatingDate(String). All other called Date version . All
implementation are the same. All fields differ only by name. If I comment the String version
it calls Date one.

I work around by removing overload : setMoodysRatingDateString(String value) ; 

So it is just bug report.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message