openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste BRIAUD -- Novlog <j-b.bri...@novlog.com>
Subject detach question
Date Thu, 03 Dec 2009 14:49:52 GMT
Hi the list,

Am i right on the following pseudo code ?

            // Note the detach.
            // getFullById come back with an instance of MyObject from the primary key
            final MyObject ooo = detach(getFullById(cc....

            < Here I modify (a lot) ooo but don't wan't the modif to be persist>

                try {
                    cc.beginTransaction();

                    <Here I modify the ooo but I want this modif to be persist, not the
other one before>

                    cc.merge(ooo);
                    cc.commitTransaction();

                } catch (...) {
                    cc.rollbackTransaction();
                }

Thanks !
Mime
View raw message