ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Wang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-5661) ignite.NET serialization failed when entity has property with IList and equals to null
Date Mon, 03 Jul 2017 14:15:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-5661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Wang updated IGNITE-5661:
-------------------------------
    Description: 
when using datastreamer or cache.put, insert entities into a cache, if there are some properties
with IList type and value is null, serialization might failed, and no cache exists in H2 database
even queryentities has been configured. but cache.count() return the count that inserted.
like codes below generates an empty cache in ignite h2 db:

{code:java}

                    using (var dc = GetDbContext(branchId)) //dc is DbContext
                    {
                        var infoList = dc.Set<CustMainInfo>().AsNoTracking().Where(cust
=> cust.BranchID == branchId && cust.DeleteFlag == 0).ToList(); //CustMainInfo
has a property IList<Company> Subsidaries and value is null.

                        foreach (var item in infoList)
                        {
                            ds.AddData(item.PK, item);
                            count++;
                            if (count % 1000 == 0)
                                Console.WriteLine(string.Format("CustMainInfoLoader:{0}",
count));
                        }
                        ds.Flush();
                    }
                
{code}

  was:
when using datastreamer or cache.put, insert entities into a cache, if there are some properties
with IList type and value is null, serialization might failed, and no cache exists in H2 database
even queryentities has been configured. but cache.count() return the count that inserted.
like codes below generates an empty cache in ignite h2 db:

{code:c#}

                    using (var dc = GetDbContext(branchId)) //dc is DbContext
                    {
                        var infoList = dc.Set<CustMainInfo>().AsNoTracking().Where(cust
=> cust.BranchID == branchId && cust.DeleteFlag == 0).ToList(); //CustMainInfo
has a property IList<Company> Subsidaries and value is null.

                        foreach (var item in infoList)
                        {
                            ds.AddData(item.PK, item);
                            count++;
                            if (count % 1000 == 0)
                                Console.WriteLine(string.Format("CustMainInfoLoader:{0}",
count));
                        }
                        ds.Flush();
                    }
                
{code}


> ignite.NET serialization failed when entity has property with IList and equals to null
> --------------------------------------------------------------------------------------
>
>                 Key: IGNITE-5661
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5661
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: windows server 2012 x64
>            Reporter: Chris Wang
>
> when using datastreamer or cache.put, insert entities into a cache, if there are some
properties with IList type and value is null, serialization might failed, and no cache exists
in H2 database even queryentities has been configured. but cache.count() return the count
that inserted.
> like codes below generates an empty cache in ignite h2 db:
> {code:java}
>                     using (var dc = GetDbContext(branchId)) //dc is DbContext
>                     {
>                         var infoList = dc.Set<CustMainInfo>().AsNoTracking().Where(cust
=> cust.BranchID == branchId && cust.DeleteFlag == 0).ToList(); //CustMainInfo
has a property IList<Company> Subsidaries and value is null.
>                         foreach (var item in infoList)
>                         {
>                             ds.AddData(item.PK, item);
>                             count++;
>                             if (count % 1000 == 0)
>                                 Console.WriteLine(string.Format("CustMainInfoLoader:{0}",
count));
>                         }
>                         ds.Flush();
>                     }
>                 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message