[JIRA] Created: (CAY-596) DataObject cache works incorrect !

From: Paul Ponec (JIRA) ("Paul)
Date: Wed Jul 12 2006 - 08:19:49 EDT

  • Next message: Andrus Adamchik: "Re: [JIRA] Closed: (CAY-593) rop-browser update"

    DataObject cache works incorrect !
    ----------------------------------

             Key: CAY-596
             URL: http://issues.apache.org/cayenne/browse/CAY-596
         Project: Cayenne
            Type: Bug

      Components: Cayenne Core Library
        Versions: 1.2
     Environment: Windows XP, 1.4.2_06 by Sun Microsystems Inc., DB Oracle
        Reporter: Paul Ponec
        Priority: Critical

    Data object util method:
            DataObjectUtils.objectForPK(context, persistentClass, (Object) id);
    returns sometimes (freqency 30% on my sample) a DataObject with an old property value.

    If I am using code:
            Expression expr = ExpressionFactory.matchExp("id", id);
            SelectQuery query = new SelectQuery(persistentType, expr);
            List list = context.performQuery(query);
            return list.size()==1 ? list.get(0) : null;

    then result (all object properties) is OK always.

    ---
    A selection from map.xml:
    <db-entity name="CALL" schema="TEST">
    		<db-attribute name="id" type="NUMERIC" isPrimaryKey="true" isMandatory="true"/>
    		<db-attribute name="sign" type="VARCHAR" length="1"/>
    </db-entity>
    <obj-entity name="Call" className="xxx.Call" dbEntityName="CALL">
    		<obj-attribute name="id" type="java.math.BigDecimal" db-attribute-path="id"/>
    		<obj-attribute name="sign" type="java.lang.String" db-attribute-path="sign"/>
    </obj-entity>
    

    -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/cayenne/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Wed Jul 12 2006 - 08:21:50 EDT