Hi Armin and Guillaume,

Thank you very much for the test, which made easy to understand what happends. 
That was not really the bug in batch mode, but rather the feature in PB API, 
which I never liked: the same method store() is used for two operations, 
INSERT and UPDATE, and in the case of batch mode additional SELECT may not 
give a correct choice, namely if the object has been deleted, but the batch 
hasn't been executed yet. I've made the algorithm of choice of INSERT or 
DELETE a bit more clever and that solved the problem. 
I've committed the fix to CVS HEAD. Should I apply the fix to the branch-1.0?

Regards,
 Oleg

On Friday 13 February 2004 19:00, Armin Waibel wrote:
> Hi Guillaume,
>
> ok, I get all your files to run your test.
>
> Have to make some modifications:
>
> - In metadata declaration of SubObject field 'mainid' you set access to
> anonymous, this is not recommended here. Anonymous fields can only safe
> used in conjunction with 1:1 references (The docs are not clear here,
> but AFAIK Brian is working on an update).
>
> - In metadata declaration of SubObject field 'id' you declare an
> attribute anonymous="true", such an attribute does not exist (AFAIK).
>
>
> *testDeleteInsert()*
> Seems to be a bug in batch handling. Without batch mode enabled test
> pass, with enabled batch mode test fails.
>
>
>
> *testEquals()*
> When I delete the object before storing the new instance with same PK
> test pass
>
>          broker.beginTransaction();
>          broker.store(main1);
>          // delete object before add new instance with same PK
>          broker.delete(main1);
>          broker.store(main2);
>          broker.commitTransaction();
>
>
>
> *testDelete()*
> test pass.
>
> You can find the TestCase in test suite (CVS HEAD) called
> ...broker.BatchModeTest. Please review my changes.
>
> regards,
> Armin
>
> Guillaume Nodet wrote:
> > I'm splitting it because i have problems when attaching a zip file.
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to