@@ -38,10 +38,6 @@ type ComponentRef struct {
3838 // entityLastUpdateVT is the consistency token for the entire entity.
3939 entityLastUpdateVT * persistencespb.VersionedTransition
4040
41- // componentLastUpdateVT is the VT when this component was last updated.
42- // This enables fine-grained change detection for polling specific components.
43- componentLastUpdateVT * persistencespb.VersionedTransition
44-
4541 // componentType is the fully qualified component type name.
4642 // It is for performing partial loading more efficiently in future versions of CHASM.
4743 //
@@ -55,6 +51,7 @@ type ComponentRef struct {
5551
5652 // componentPath and componentInitialVT are used to identify a component.
5753 componentPath []string
54+ componentVT * persistencespb.VersionedTransition
5855 componentInitialVT * persistencespb.VersionedTransition
5956
6057 validationFn func (NodeBackend , Context , Component ) error
@@ -128,7 +125,7 @@ func (r *ComponentRef) Serialize(
128125 EntityVersionedTransition : r .entityLastUpdateVT ,
129126 ComponentPath : r .componentPath ,
130127 ComponentInitialVersionedTransition : r .componentInitialVT ,
131- ComponentVersionedTransition : r .componentLastUpdateVT ,
128+ ComponentVersionedTransition : r .componentVT ,
132129 }
133130 return pRef .Marshal ()
134131}
@@ -154,10 +151,10 @@ func ProtoRefToComponentRef(pRef *persistencespb.ChasmComponentRef) ComponentRef
154151 BusinessID : pRef .BusinessId ,
155152 EntityID : pRef .EntityId ,
156153 },
157- archetype : Archetype (pRef .Archetype ),
158- entityLastUpdateVT : pRef .EntityVersionedTransition ,
159- componentLastUpdateVT : pRef .ComponentVersionedTransition ,
160- componentPath : pRef .ComponentPath ,
161- componentInitialVT : pRef .ComponentInitialVersionedTransition ,
154+ archetype : Archetype (pRef .Archetype ),
155+ entityLastUpdateVT : pRef .EntityVersionedTransition ,
156+ componentVT : pRef .ComponentVersionedTransition ,
157+ componentPath : pRef .ComponentPath ,
158+ componentInitialVT : pRef .ComponentInitialVersionedTransition ,
162159 }
163160}
0 commit comments