Skip to content

[Error when object update] schema mismatch for Diet_Plans.createdAt; expected Date but got String #27

Closed
@ghost

Description

Hi,

There is a problem with the object update, this is my code :
`updateDietPlan() async {
var response = await DietPlan().getObject('U4FyTrkpBH');

if (response.success) {
  var dietPlan = (response.result as DietPlan);
  print("(before update) dietPlan: $dietPlan");

  dietPlan.set<int>('Fat', 666);
  print("(after update) dietPlan: $dietPlan");
  dietPlan.save();
} else {
  print(ApplicationConstants.APP_NAME + ": " + response.error.message);
}

}`

And this is the console:
I/flutter (17474): I/flutter (17474): ---- I/flutter (17474): Hello Flutter API Response (Diet_Plans : ParseApiRQ.get) : I/flutter (17474): Status Code: 200 I/flutter (17474): Payload: {"objectId":"U4FyTrkpBH","Name":"Test1","createdAt":"2019-01-11T10:40:08.121Z","updatedAt":"2019-01-11T10:40:52.692Z","Fat":11} I/flutter (17474): ---- I/flutter (17474): (before update) dietPlan: {"objectId":"U4FyTrkpBH","Name":"Test1","createdAt":"2019-01-11T10:40:08.121Z","updatedAt":"2019-01-11T10:40:52.692Z","Fat":11} I/flutter (17474): (after update) dietPlan: {"objectId":"U4FyTrkpBH","Name":"Test1","createdAt":"2019-01-11T10:40:08.121Z","updatedAt":"2019-01-11T10:40:52.692Z","Fat":666} I/flutter (17474): I/flutter (17474): ---- I/flutter (17474): Hello Flutter API Response (Diet_Plans : ParseApiRQ.save) : I/flutter (17474): Status Code: 111 I/flutter (17474): Type: IncorrectType I/flutter (17474): Error: schema mismatch for Diet_Plans.createdAt; expected Date but got String I/flutter (17474): ----

In advance, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions