I am trying to make a readonly entity to writable by using
Transaction.runwithNewBundle(\bundle -> {
entity = bundle.add(entity)
})
but I am getting
java.lang.IllegalArgumentException: You cannot change a locked branch.
Please help me out with this.