Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14064

.NET: Incorrect table name when query type is generic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.11
    • platforms
    • .NET: Fix inferred SQL table name when query entity value type is generic
    • Release Notes Required

    Description

      Using a generic type as a QueryEntity value type results in a broken SQL table name:

                  var ignite = Ignition.Start(TestUtils.GetTestConfiguration());
      
                  var cfg = new CacheConfiguration(
                      TestUtils.TestName,
                      new QueryEntity(typeof(int), typeof(GenericTest<string>)));
      
                  var cache = ignite.GetOrCreateCache<int, GenericTest<string>>(cfg);
                  cache[1] = new GenericTest<string> {Prop = "1"};
      
                  var tables = cache.Query(new SqlFieldsQuery("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES"))
                      .Select(x => (string) x.Single()).ToArray();
      

      Resulting table name is 0, CULTURE=NEUTRAL, PUBLICKEYTOKEN=7CEC85D7BEA7798E]].
      We should add .NET generics support to org.apache.ignite.internal.processors.query.QueryUtils.typeName.

      Attachments

        Issue Links

          Activity

            People

              ptupitsyn Pavel Tupitsyn
              ptupitsyn Pavel Tupitsyn
              Igor Sapego Igor Sapego
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m