CannerCMS/cannercms

Relation field not storing relationships consistently

tawanorg opened this issue · 4 comments

Last item set is NULL as always.

<array
        keyName="layers" 
        title="Layers" 
        ui="panel"
        refetch
        graphql={`
          query($pagesWhere: PageWhereInput) {
            pages: pagesConnection(where: $pagesWhere) {
              edges {
                cursor
                node {
                  id
                  title
                }
              }
            }
          }
        `}
      >
        <relation
          title="Child Layers"
          keyName="childLayers"
          ui="singleSelectTree"
          relation={{to: 'layers', type: 'toOne'}}
          uiParams={{
            relationField: 'childLayers',
            textCol: 'title',
            columns: [
              {
                title: "${layers.title}",
                dataIndex: "title"
              }
            ],
            relationField: "layers"
          }}
        />
      </array>

screen shot 2562-02-18 at 19 16 35

Hi @ttawan

May I know the following information

  • OS
  • Node version
  • Canner version

Thanks

@ttawan Please provide us your full canner schema as well, so we can reproduce your situation.

Thanks

hi @ttawan any update on this issue?

After taking a look at your data, I believe you use a relation field inside an array field, which is not an acceptable schema currently. Hope it helps.

Thanks!

temporarily close this issue due to no further response from the issuer.