Integer[] value cannot be inserted into a PostgreSql database with LinqConnect

Integer[] value cannot be inserted into a PostgreSql database with LinqConnect

Hello,

We have a column with datatype integer[] in one of our database tables.
Using repository pattern, when we run this code:

  1. OurTableEntity entity = new OurTableEntity();
    entity.OurColumn = "{-1,-1,-1,-1,-1}";
    ourTableRepository.Add(entity);

    unitOfWork.Save(); // dataContext.SubmitChanges();
The SubmitChanges will throw an exception:

Inner Exception 1:
  1. LinqCommandExecutionException: Error on executing DbCommand.

Inner Exception 2:
  1. InvalidCastException: Cannot convert parameter value of type 'System.String' to PostgreSQL type 'PgSqlType.Int'.

Same outcome, when I modify a queried entity's 'OurColumn' and then call SubmitChanges().
A query like repository.GetAll() works properly.

In C# we have this auto generated code for the column:
  1. [Column(Name = @"our_column", Storage = "_OurColumn", DbType = "INT4[]", UpdateCheck = UpdateCheck.Never)]
  2. public object OurColumn
  3. {
  4.     get
  5.     {
  6.         return this._OurColumn;
  7.     }
  8.     set
  9.     {
  10.         if (this._OurColumn != value)
  11.         {
  12.             this.OnLotGroupsChanging(value);
  13.             this.SendPropertyChanging("OurColumn");
  14.             this._OurColumn = value;
  15.             this.SendPropertyChanged("OurColumn");
  16.             this.OnLotGroupsChanged();
  17.         }
  18.     }
  19. }

And we have the code below in the database.lqml file:
  1. <Column Name="our_column" Member="OurColumn" Type="System.Object" DbType="INT4[]" CanBeNull="true" UpdateCheck="Never" DefaultValue="'{-1,-1,-1,-1,-1}'::integer[]" ed:ValidateRequired="false" ed:Guid="91a849ae-cd37-4273-ab4b-d901c5ea093e" />

We have a datacontext log:
  1. INSERT INTO public.our_table (our_column, id) VALUES (:p1, nextval('seq_custom_sequence')) RETURNING id
    -- p1: Input Int (Size = 16; DbType = Int32) [{-1,-1,-1,-1,-1}]
Project: C# .NET Framework 4.8
Devart.Data: 5.0.2531.0
Devart.Data.Linq: 4.9.2076.0
Devart.Data.PostgreSql: 7.18.1739.0
Devart.Data.PostgreSql.Linq: 4.9.2076.0

It looks like that linqConnect tries to cast this string to integer, instead of integer[].

Please help us with this issue!

Best regards,
Gabor