1.Yeah. You allright. We do not save the objects directly. All objects have
ids and we save they ids and ids to refrenced objects. See below:

   public class CacheFieldProperty
    {
        public int Id { get; set; }
        public int FormId { get; set; }//id of form object
...
other properties
......

      public override void WriteBinary(IBinaryWriter writer)
        {
            writer.WriteInt(nameof(Id), Id);
....
            writer.WriteInt(nameof(FormId), FormId);
        }


   public override void ReadBinary(IBinaryReader reader)
        {
            Id = reader.ReadInt(nameof(Id));
....
            FormId = reader.ReadInt(nameof(FormId));
        }

It is working ok.

2.
And now we are at server. The filter implemented ICacheEntryFilter<int,
CacheFieldProperty>

 public class CachePropertyNameFilter : ICacheEntryFilter<int,
CacheFieldProperty>
    {
        [InstanceResource]
        private IIgnite _ignite;
.....

we have only function

 public bool Invoke(ICacheEntry<int, CacheFieldProperty> entry)
        {

the entry.Value is ok
but we have only written properties Id, FormId.
But we NEEd to get the object Form from cache here for using it!!!
we need check some properties of Form object.

but the field _ignite is null and we have no access to cache to get it.
how to get Form object by FormId from Ignite here????

I've checked this attribute at differ places. The result is null always.
        }

Can you provide the working (or not working sample or link or something
else) of using cache from .Net filter?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to