cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Álvaro Martínez <alvaro_marti...@ptbsl.com>
Subject Re: Selective commit
Date Wed, 09 Jan 2008 08:51:45 GMT

Using brand new data contexts solved the problem! I just replaced this 
function:

    public DataContext getNewContext() {
        DataContext newContext = context.createChildDataContext();
        newContext.setTransactionEventsEnabled(true);
        newContext.setValidatingObjectsOnCommit(true);
        return newContext;
    }

With this one:

    public DataContext getNewContext() {
        return DataContext.createDataContext(true);
    }

And everything is ok now. I didn't touch any other piece of code.

Thank you very much!



Andrus Adamchik escribió:
> BTW, while I am investigating the bug with nested contexts ... do you 
> have to use them at all? Can you just use multiple peer DataContexts 
> instead?
>
> Andrus


Mime
View raw message