How can i GetComponentData from another entity within jobs?

I am having trouble to access component data from another entity, entityManager.GetComponentData and entityManager.SetComponentData always thowing out error message like
(InvalidOperationException: The ComponentTypeHandle has been declared as [WriteOnly] in the job, but you are reading from it.)

Do i have to use EntiyCommandBuffer for that? Or is it because something wrong with how i set up my component.

You need to show the source code of your job.


Yes , sorry , thought it was a generic question , here are the related code.

    public readonly partial struct BeltAspect : IAspect
    {
        private readonly TransformAspect _transformAspect;
        private readonly DynamicBuffer<Child> _childBuffer;
        private readonly RefRW<BeltComponent> _belt;

public void MoveItemOnBelt(float deltaTime)
        {
            var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
            var childArray = ChildArray;

            for (var i = 1; i < childArray.Length; i++)
            {
                var itemOnBelt = entityManager.GetComponentData<ItemOnBelt>(childArray[i].Value);
                itemOnBelt.Offset = _belt.ValueRO.ItemOffset;
                if (i == 1)
                {
                    // calculate progress
                        }
                    }
                    else
                    {
                        var nextBelt = entityManager.GetComponentData<BeltComponent>(_belt.ValueRO.NextBelt);
                        if (nextBelt.EndingPosToItemDistance <= 0f)
                        {
                            if (itemOnBelt.Progress <= 1.0f)
                            {
                                itemOnBelt.Progress += _belt.ValueRO.Speed * deltaTime;
                            }
                            else
                            {
                                var parent = entityManager.GetComponentData<Parent>(childArray[i].Value);
                                parent.Value = _belt.ValueRO.NextBelt;
                                entityManager.SetComponentData(childArray[i].Value, parent);
                                itemOnBelt.Progress = 0f;
                                // TODO set parent
                            }
                        }
                        else
                        {
                            if (itemOnBelt.Progress >= 1.0 &&
                                nextBelt.EndingPosToItemDistance > nextBelt.SpaceFromItemsOnBelt)
                            {
                                var parent = entityManager.GetComponentData<Parent>(childArray[i].Value);
                                parent.Value = _belt.ValueRO.NextBelt;
                                entityManager.SetComponentData(childArray[i].Value, parent);
                                itemOnBelt.Progress = 0f;
                                // TODO set parent
                            }

                            if (nextBelt.EndingPosToItemDistance + _belt.ValueRO.StartingPosToItemDistance >=
                                _belt.ValueRO.SpaceFromItemsOnBelt)
                            {
                                itemOnBelt.Progress += _belt.ValueRO.Speed * deltaTime;
                            }
                        }
                    }
                }
    public partial struct MoveItemOnBeltJob : IJobEntity
    {
        public float DeltaTime;

        [BurstCompile]
        public void Execute(BeltAspect beltAspect)
        {
            beltAspect.MoveItemOnBelt(DeltaTime);

I just realized the problem might be that I put all calculation in IAspect, maybe i should use Isystem directly?