Persistable.unremove() disabled

#1

Persistable.unremove() throws a “disabled …” message in databases where rollback is enabled. I assume that this needs to be configured by type. How is it done?

#2

You probably need to add a db annotation above your type declaration:
c3ShowType(Ann.Db)
And then look at

archive: boolean
Indicates that a type's objs should be archived, rather than fully removed during Persistable#remove. Archived instances can be restored using Persistable#unremove.```

So try:
@db(archive=true)
MyType ...
1 Like