Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jan 11, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 11, 2019

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.

@phillwiggins
Copy link
Member

Thank you, will look at that now and release in v1.0.5.

@phillwiggins
Copy link
Member

Problem now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant