chaokunyang commented on issue #1187:
URL: https://github.com/apache/fory/issues/1187#issuecomment-3748924871

   You can use `ForyField` annotation to control ref tracking for fields 
https://fory.apache.org/docs/next/guide/java/field_configuration#reference-tracking-ref:
   
   ```java
   public class RefOuter {
       // Both fields may point to the same inner object
       @ForyField(id = 0, ref = true, nullable = true)
       private RefInner inner1;
   
       @ForyField(id = 1, ref = true, nullable = true)
       private RefInner inner2;
   }
   
   public class CircularRef {
       @ForyField(id = 0)
       private String name;
   
       // Self-referencing field for circular references
       @ForyField(id = 1, ref = true, nullable = true)
       private CircularRef selfRef;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to