You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Danut Radoaica (Jira)" <ji...@apache.org> on 2021/01/27 08:57:00 UTC

[jira] [Commented] (IGNITE-13639) .NET: No coercion operator is defined between types 'System.Int32' and 'swagger.Models.IndexParameter[]'.

    [ https://issues.apache.org/jira/browse/IGNITE-13639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272691#comment-17272691 ] 

Danut Radoaica commented on IGNITE-13639:
-----------------------------------------

The problem is still happening in v2.9.1 and is related with propeties of type IList<T>:

 

public class Class1public class Class1\{ public IList<SimpleClass1> List1 { get; set; } public IList<SimpleClass2> List2 \{ get; set; }}
public class SimpleClass1\{ public Guid Id { get; set; }}
public class SimpleClass2\{ public Guid Id { get; set; }}

> .NET: No coercion operator is defined between types 'System.Int32' and 'swagger.Models.IndexParameter[]'.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-13639
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13639
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 2.9
>         Environment: Apache Ignite: v2.9.0
> JDK: v1.8
> .NET Core: v3.1
>            Reporter: Danut Radoaica
>            Priority: Major
>              Labels: .NET, 2.9.1-rc
>         Attachments: BotXEntityDto.cs, exception.txt, stream_dump.txt
>
>
> [^exception.txt] contains the stack trace
> [^stream_dump.txt]  contains the stream that fails, dumped using System.Text.Encoding.UTF8.GetString
> [^BotXEntityDto.cs] contains the dto definition
> ignite 2.8.1: it works
> ignite 2.9.0:
> this works:
> ICacheClient<int, BotXEntityDto[]> botXEntityCacheClient = _igniteManager.GetOrCreateCacheClient<int, BotXEntityDto[]>($"\{MLConstants.APPLICATION_NAME}#\{nameof(BotXEntityCacheManager)}")
>  .WithExpiryPolicy(new ExpiryPolicy(TimeSpan.FromHours(3), TimeSpan.FromHours(3), TimeSpan.FromHours(3)));
>  *await botXEntityCacheClient.PutAsync(tenant.Id.Value, tenantBotRelatedEntities.Items.ToArray()).ConfigureAwait(false);*
> and the same key does not work with:
> ICacheClient<int, BotXEntityDto[]> botXEntityCacheClient = _igniteManager.GetOrCreateCacheClient<int, BotXEntityDto[]>($"\{MLConstants.APPLICATION_NAME}#\{nameof(BotXEntityCacheManager)}")
>  .WithExpiryPolicy(new ExpiryPolicy(TimeSpan.FromHours(3), TimeSpan.FromHours(3), TimeSpan.FromHours(3)));
>  {color:#ff0000}*CacheResult<BotXEntityDto[]> cacheResult = await botXEntityCacheClient.TryGetAsync(tenantId).ConfigureAwait(false);*{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)