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
@omatrot I think you should take a look at #9
I managed to do it with something like this:
class A {
b: B;
}
class B {
a: A
}
class C {
// declare your model schema here, it has to be declared after A and B,
// for my case I have class C using class A so this is natural, but maybe you can just declare
// everything in one file
}
if A -> object() -> B,
B -> object() -> A creates a circular serialization structure which will run forever.
create id field on either side and reference them with reference()
I used this util function to generate unique id for distinct classes
I have the following Circular reference:
Vehicle->Device->Vehicle
Vehicle has a Device nested object and vice-versa.
When I deserialize Vehicule, because Device has not been seen yet, the corresponding property is not set.
I would say that unresolved references are left unprocessed.
Am I wrong about that?
Is there a simple way to solve this problem?
The text was updated successfully, but these errors were encountered: