You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following dict is the result of a to_dict with pointers. The vectors of the to modules are equal and both should point to to the ref of the first occurence in _references. However, only the second one redirect to it, the first one stays {name : "Vector 1"} at location #/vessel/modules/0/origin or #/_references/1012d774-b552-11ee-8c66-4d72d9812f94/direction just like Module 2 whereas it should be
This shows how Vector 1 is at first well replaced in the resulting dict, but not in its parent dict. As his parent is replaced afterwards, this first operation is cancelled
What is the motivation / use case for changing the behavior?
The problem here is that we lose the information that these two vectors are initially equal to each other. When dealing with dicts only there is no way to get this information back
Possible fixes
We should probably inverse serialization order, but this seems dangerous, as the current issue occurs in a very specific usecase.
A refactor of how things are serialized, using OO, is probably a prerequisite
Please tell us about your environment:
branch: dev
commit: latest
python version: 3.10
The text was updated successfully, but these errors were encountered:
**Note: for support questions, please use https://nextcloud.dessia.tech/call/hr9z9bif
I'm submitting a ...
What is the current behavior?
The following dict is the result of a to_dict with pointers. The vectors of the to modules are equal and both should point to to the ref of the first occurence in
_references
. However, only the second one redirect to it, the first one stays{name : "Vector 1"}
at location#/vessel/modules/0/origin
or#/_references/1012d774-b552-11ee-8c66-4d72d9812f94/direction
just like Module 2 whereas it should beObject Structure
Script :
Insert these prints in the corresponding
serialization.py
method :This shows how Vector 1 is at first well replaced in the resulting dict, but not in its parent dict. As his parent is replaced afterwards, this first operation is cancelled
The problem here is that we lose the information that these two vectors are initially equal to each other. When dealing with dicts only there is no way to get this information back
We should probably inverse serialization order, but this seems dangerous, as the current issue occurs in a very specific usecase.
A refactor of how things are serialized, using OO, is probably a prerequisite
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: