Column specified twice

Hello,
After migrating from 3.x to 4/5, I faced a lot of SQL issues. You had previously assisted me on fixing an error related to lost email templates.
In fact, I am currently unable to save data to one of my tables due to a duplicated column; the exception I am having is attached with the topic.
App ID: 709E3602-AABE-41E9-FF47-48B4C07F4700
Thank you in advance for you support!
Ralph :slight_smile:

Hi Ralph

Iā€™ve created an internal ticket BKNDLSS-17427 for investigation the issue and we will notify you here about any progress

Thanks, Vlad

Thank you Vlad for your quick response!

I can reproduce the issue if trying to execute next curl:

curl -X POST -H 'Content-Type:application/json' 'https://api.backendless.com/709E3602-AABE-41E9-FF47-48B4C07F4700/<api-key>/data/Event' -d '{"Starttime" : 425245346, "starttime" : 425245346}'

or just send ā€œstarttimeā€ in lower case

curl -X POST -H 'Content-Type:application/json' 'https://api.backendless.com/709E3602-AABE-41E9-FF47-48B4C07F4700/<api-key>/data/Event' -d '{"starttime" : 425245346}'

but you have declared this column as ā€œStarttimeā€ so you have to change it in your code, or change the column name in the Backendless console

Also I have found another issue with Ads table, if you use curl count works fine, but in the backendless console you receive Network Error. so I have created internal ticket for this issue BKNDLSS-17454

Hello Sergey,

thank you for your time and response!

During the migration I have not changed anything within my code that could lead to this blocking.
Regarding your answer, I can not modify anything on the server and affect negatively the other platforms. Therefore, I tried downloading the ā€œCRUD generating codeā€ and replace my ā€œEventā€ object with the new one but nothing changed.

I do not see where I can modify the attribute in my code knowing that I have no ā€œstarttimeā€ anywhere. (I performed a search on all the project).

Thank you again!

There is a bug in the 3.x version that allows to use column names like ā€œstarttimeā€ and ā€œStarttimeā€ in one request.

So you definitely have ā€œstarttimeā€ in your code that is why you have this error

Hello again Sergey,
I do not have any ā€œstarttimeā€ nor ā€œendtimeā€ in my code. Almost all attributes in my Event object start with a uppercase.

Looking at the sql error in the screenshot I have previously attached, you can see that all column names are lowercase while on the server they are in uppercase eg. ā€œVerifiedā€ on the console and ā€œverifiedā€ in the error stack.
Therefore, I deduce that only for Datetime data types this error occurs eg. ā€œStarttimeā€ and ā€œEndtimeā€ in my case. It is kind of risky to change anything on the console now, next week I should publish an update that will upgrade users from 3.x to 5.x
Event.txt (5.6 KB)

Hi Ralph,
Can you please prepare a sample request your app is doing, so that we could run it as is and see the cause of the problem?

Hello Surgey,
Of course. I will attach the original .java of the upload activity along with a modified class where it uploads info automatically.
Please let me know if you need any additional info.

Thanks !
UploadEventsActivity.txt (54.9 KB)
UploadEventsActivity-SAMPLE.txt (4.1 KB)

I can see next code event.setStarttime so Starttime wel be serialized as starttime be cause if standart java convension, unless you use data column name mapping http://backendless.com/docs/android/doc.html#data_column_name_mapping

Surgey,
nothing worked, not even the name mapping. I am quite sure there is a bug related to DATETIME type but thatā€™s ok, I have modified the string on my server and adapted the iOS and Android apps accordingly.

Thank you for your help!

Attached simple example:

public class TestColumnName
{
  private Date TestColumn;

  @MapToProperty( property = "TestColumn" )
  public Date getTestColumn()
  {
    return TestColumn;
  }

  public TestColumnName setTestColumn( Date testColumn )
  {
    TestColumn = testColumn;
    return this;
  }
}

if you remove @MapToProperty( property = "TestColumn" ) then you will receive the same exception as you have in your code column_example.zip (1010.7 KB)