1

The primary key existed before and now it needs to be made new.

This is how I modified it, but duplicate data will appear.

Before:

@Entity
class A {
    @Id(assignable = true)
    long id;
}

Now:

@Entity
class A {
    @Id
    long boxId;
    long id;
}
Monster
  • 11
  • 2
  • current solution: `@Uid(5958743963287218505L) @Unique(onConflict = ConflictStrategy.REPLACE) long id; ` But this modification will change all the existing ids to 0, so I also add a judgment on the data: if the id and boxId are both 0, then download the data again. – Monster Jan 26 '22 at 09:25

0 Answers0