public static void sudoSave ( final ODocument ... docs ) { if ( docs == null || docs . length == 0 ) return ; new DBClosure < Boolean > ( ) { @ Override protected Boolean execute ( ODatabaseDocument db ) { db . begin ( ) ; for ( ODocument doc : docs ) { db . save ( doc ) ; } db . commit ( ) ; return true ; } } . execute ( ) ; }
Allow to save set of document under admin