N
N
nikita_chiru2016-07-10 12:47:23
Android
nikita_chiru, 2016-07-10 12:47:23

How to delete line by line in Sugar ORM?

adding works great, but with the removal of the problem ...

contentView.findViewById(R.id.action).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Korz korz = new Korz(name, price,image);
                    korz.save();


                    Toast.makeText(getApplicationContext(),  name+"Цена"+price, Toast.LENGTH_SHORT ).show();




                }
            });
            contentView.findViewById(R.id.delite).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    Izb contact = Izb.findById(Izb.class,String name);
                    contact.delete();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nikita_chiru, 2016-08-03
@nikita_chiru

went the clumsy method through a name matching search
Korz.deleteAll(Korz.class, "name = ?", name);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question