Skip to content
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

The EJson codecs generated by realm_generator don't handle collections #1542

Closed
nielsenko opened this issue Mar 7, 2024 · 1 comment · Fixed by #1543
Closed

The EJson codecs generated by realm_generator don't handle collections #1542

nielsenko opened this issue Mar 7, 2024 · 1 comment · Fixed by #1543
Assignees

Comments

@nielsenko
Copy link
Contributor

Example:

  static Team _fromEJson(EJsonValue ejson) {
    return switch (ejson) {
      {
        'name': EJsonValue name,
        'players': EJsonValue players,
        'scores': EJsonValue scores,
      } =>
        Team(
          fromEJson(name),
        ),
      _ => raiseInvalidEJson(ejson),
    };
  }

Should be:

  static Team _fromEJson(EJsonValue ejson) {
    return switch (ejson) {
      {
        'name': EJsonValue name,
        'players': EJsonValue players,
        'scores': EJsonValue scores,
      } =>
        Team(
          fromEJson(name),
          players: fromEJson(players),
          scores: fromEJson(scores),
        ),
      _ => raiseInvalidEJson(ejson),
    };
  }
@nielsenko nielsenko self-assigned this Mar 7, 2024
Copy link

sync-by-unito bot commented Mar 7, 2024

➤ PM Bot commented:

Jira ticket: RDART-960

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant