Question

How can we write update entity ActiveObject - com.atlassian.activeobjects.external.ActiveObjects.

Any one please share me the stuff.

I am using create entity activeobject stuff as below and it works fine:

    en pi = ao.executeInTransaction(new TransactionCallback() // (1)            
        {   
             @Override
             public en doInTransaction()
             {
                logger.info("before ao.create");
                en pi = ao.create(enclass);
                                    ....

                pi.save();                              
                return pi;          
             }
        });

Thanks

Was it helpful?

Solution

Select the id, set your data in the testAO and finaly save it.

            public Object doInTransaction(){
                TestAO testAO = ao.get(TestAO.class,issueXXX.getId());
                testAO.setError(issueXXX.getError());
                testAO.save();
                return null;
            }

You can update only one by one, this is the easy way.

OTHER TIPS

I did it this way

ao.executeInTransaction(new TransactionCallback<Void>() {
        @Override
        public Void doInTransaction() {
           Formulario form = ao.get(Formulario.class,id_ingresado);
           form.setName(nombre_ingresado);
           form.setLastName(apellido_ingresado);
           form.setDate(fecha_ingresada);
           form.setPhone(telefono_ingresado);
           form.save();
           return null;
        }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top