db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: problem with multiple updates on same object (mark for store)
Date Wed, 05 Feb 2003 21:28:05 GMT
hi matthew,

i did a temp fix for this problem to avoid multiple inserts only:

            if (m_markedForStore != null)
            {
                if (m_markedForStore.containsKey(obj))
                {
                    Boolean insertUpdateMarker = (Boolean) 
m_markedForStore.get(obj);
                    // BRJ : avoid multiple insert
                    if (insert == true && 
insertUpdateMarker.booleanValue() == insert)
                    {
                        return;
                    }
                }
            }

hth
jakob


Matthew Baird wrote:

>in my defense, we DO need a test for this, since I ran the testbed and didn't find any
errors I assumed everything was fine.
>
>
>-----Original Message-----
>From: Jakob Braeuchi [mailto:jbraeuchi@gmx.ch]
>Sent: Wednesday, February 05, 2003 1:07 PM
>To: OJB Developers List
>Subject: problem with multiple updates on same object (mark for store)
>
>
>hi matthew,
>
>i think we have a problem with multiple updates on the same object.
>the testcase PersistanceBrokerTest.testEscaping fails because of this.
>
>        Article a = createArticle(testId);
>        a.setArticleName("Single quote 'article");
>        storeArticle(a);   --> INSERT
>...
>        a.setArticleName("2 Single quotes 'article'");
>        storeArticle(a);   --> UPDATE
>...
>        a.setArticleName("double quote \"article");
>        storeArticle(a);   --> does NOT update the article due to mark 
>for store
>
>can you pleas have a look at it ?
>
>jakob
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>  
>


Mime
View raw message