s2daoのversionNoでハマリ
versionNoというプロパティを持ったJavaBeanをs2daoに渡したところ、
org.seasar.framework.beans.IllegalPropertyRuntimeException:
[ESSR0059]クラス(HogeHoge)のプロパティ(versionNo)の設定に失敗しました。理由はjava.lang.IllegalArgumentException: argument type mismatch
とエラーが出た。
ソースを追ってみると、
public abstract class AbstractAutoHandler extends BasicHandler implements UpdateHandler { 〜略〜 protected void updateVersionNoIfNeed(Object bean) { if (getVersionNo() != null) { PropertyDesc pd = getBeanMetaData().getVersionNoPropertyType().getPropertyDesc(); pd.setValue(bean, getVersionNo()); } } }
とかいう処理が行われていて、String型のversionNoに、Integer型の値を入れようとしてて上記エラーが出てた。
で、この処理は何だろうとマニュアルを見ると、
どうやらversionNoは排他制御用に使用されているらしい・・・。
仕方がないのでJavaBeanのプロパティをversionNumberに変更して、
public static final String versionNumber_COLUMN="version_no";
を追加。
カラム名を変更するかどうかは思案中・・・。