Reset a change to an object the same session deletes to NULL

Aperta
#1,987 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, sql
Ambito
databases

Direzione di ricerca

The behavior is a data property change being reset to NULL when the object it points to is deleted in the same session; the payload names no source files. Start from the lsFusion LSF example in the issue body to reproduce the status(t) case, then look for the session change-handling code in the Java platform sources that decides which saved value a property falls back to on DELETE. Done means the example yields status(t) = NULL for the reset case while the dropValueChangesBackwardCompatibility setting restores the old result.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

When an object is deleted, a data property whose value it was reads NULL. A change of the property made in the same session to that object was dropped instead, and the property read its saved value again:

CLASS Status;
CLASS Task;
status = DATA Status (Task);

// t is saved with the status s, x is another status
status(t) <- x;
DELETE x;
// was: status(t) = s, nothing changed; now: status(t) = NULL, as for a task saved with x

Such a change is now reset to NULL as well. An application can notice it only where the saved value of the property is another object: a NONULL property fails the apply as not set, an object with a NONULL DELETE property moved under the deleted object is deleted with it, events and constraints on CHANGED / DROPPED of the property fire, forms show no value. The previous behavior is available with the dropValueChangesBackwardCompatibility setting.

Reason

Reading the saved value again was no undo of the change: the session's earlier changes of the property were lost with it (status(t) <- NULL; status(t) <- x; DELETE x; brought the saved status back), a NONULL property passed with a value nobody chose, and a form kept showing the saved option after the picked one was deleted.

Lingua principale
Java
Stelle
214
Fork
46
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lsfusion/platform

Tutte le issue di lsfusion/platform

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.