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

map[string]boolの値を持つフィールドについてkeyとしてidを渡す時にrefが展開されない #14

Closed
say-ya-sigma opened this issue Feb 4, 2022 · 0 comments · Fixed by #15
Assignees

Comments

@say-ya-sigma
Copy link
Collaborator

firestoreの検索機能を上手く使うためにkeyとして他のドキュメントのIDを持つフィールドを設ける場合があります。その場合ftiのペイロードとして以下のような構造体が使われます。

[
  {
    ref: "Option__dummy_0",
    payload: {
      name: "選択肢1",
    },
  },
]
[
  {
    ref: "Foo__dummy_0",
    payload: {
      Options: {
        $Option__dummy_0: true,
      },
    },
  },
]

これを正しく動かすためには、keyに対するrefの置換処理を挟む必要があります。

@say-ya-sigma say-ya-sigma self-assigned this Feb 4, 2022
moezakura added a commit that referenced this issue Feb 8, 2022
common inserterにmap[string]interfaceの場合のkeyの差し替えを実装
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

Successfully merging a pull request may close this issue.

1 participant