Hello folks,

Bizarre. I get a BigDecimal class cast exception whereas I do not deal with
BigDecimal on this table.

My table is as following:

  <table name="RECIPE_LANGUAGE_DESCRIPTION">
    <column name="RECIPE_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="LANGUAGE_ID" required="true" primaryKey="true"
type="INTEGER"/>
    <column name="DESCRIPTION" type="LONGVARCHAR"/>

    <foreign-key foreignTable="RECIPE">
        <reference local="RECIPE_ID" foreign="RECIPE_ID"/>
    </foreign-key>
    <foreign-key foreignTable="LANGUAGE">
        <reference local="LANGUAGE_ID" foreign="LANGUAGE_ID"/>
    </foreign-key>
  </table>

My code is:

RecipeLanguageDescription t = new RecipeLanguageDescription();
t.setRecipeId( "140" );
t.setLanguageId( "120" );
t.setDescription( "TEST" );

RecipeLanguageDescriptionPeer.doInsert( t );

And I get:

[Wed Jan 30 22:29:02 GMT 2002] -- ERROR --
        Exception:  java.lang.ClassCastException: java.math.BigDecimal
        Stack Trace follows:
        java.lang.ClassCastException: java.math.BigDecimal
        at
com.mctar.menu.om.BaseTarMenuRecipeLanguageDescription.setPrimaryKey(BaseRec
ipeLanguageDescription.java:398)
        at
com.mctar.menu.om.BaseTarMenuRecipeLanguageDescriptionPeer.doInsert(BaseReci
peLanguageDescriptionPeer.java:308)
        at
com.mctar.modules.actions.admin.RecipeUpdateAction.insertEntity(RecipeUpdate
Action.java:182)

With '0', '120', 'TEST' in my DB!!!

I must admit I do not really understand what's going on here. Could anybody
help please ?

Thanks,

Emmanuel.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to