Not all values are saved

From: Tobias Marx (tobias.mar..ivecast.com)
Date: Wed May 30 2007 - 10:42:44 EDT

  • Next message: Andrus Adamchik: "Re: Not all values are saved"

    Hi there!

    I am having some problems trying to save an object using Cayenne's
    CayenneDataObject.class

    I have added 3 new attributes to an already-existing object, but those
    values are not stored.

    Inside the XML file these additional lines are:

    <db-attribute name="has_index" type="BOOLEAN"/>
    <db-attribute name="has_wkn" type="BOOLEAN"/>
    <db-attribute name="wknisin" type="VARCHAR" length="15"/>

    Inside the _Clip.java class the methods are:

    public void setHasIndex(Boolean hasIndex) {
            writeProperty("hasIndex", hasIndex);
    }
     
    public Boolean getHasIndex() {
            return (Boolean)readProperty("hasIndex");
    }
        
        
    public void setHasWkn(Boolean hasWkn) {
            writeProperty("hasWkn", hasWkn);
    }

    public Boolean getHasWkn() {
            return (Boolean)readProperty("hasWkn");
    }

    The code that saves the new data is:

    getClip().saveObject(context);

    If I add another lines for debug purposes:

            Clip temp = getClip();
            getClip().saveObject(context);

    temp contains true, true and "something".

    However, the line that is stored in the database table
    Contains null, null, null for those 3 Attributes.

    Any ideas?

    Thanks!

    Tobias
                    
                    

        



    This archive was generated by hypermail 2.0.0 : Wed May 30 2007 - 10:43:37 EDT