Giter Club home page Giter Club logo

Comments (4)

wkentdag avatar wkentdag commented on June 17, 2024

+1 experiencing the same issue.

  "dependencies": {
    "@azure/storage-blob": "^12.17.0",
    "@nouance/payload-better-fields-plugin": "^1.3.5",
    "@payloadcms/bundler-webpack": "^1.0.6",
    "@payloadcms/db-postgres": "^0.x",
    "@payloadcms/plugin-cloud-storage": "^1.1.2",
    "@payloadcms/plugin-search": "^1.1.0",
    "@payloadcms/richtext-lexical": "^0.7.0",
    "cross-env": "^7.0.3",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "payload": "^2.11.2"
  },
Screen Shot 2024-04-05 at 5 58 23 PM

from payload.

slavanossar avatar slavanossar commented on June 17, 2024

I did some investigating and it seems like the issue actually originates within the db-mongodb adaptor, although haven't been able to pinpoint where.

from payload.

slavanossar avatar slavanossar commented on June 17, 2024

Looking at the code in db-mongodb it's clear that relationTo isn't a supported operation and so is completely ignored by parseParams, buildSearchParam, etc., due to not being a included in validOperators or in the operatorMap.

It seems like the issue actually stems from the generation of the collection's schema, since relationTo should actually contain an operator when used within a where query.

The Search_where inputs are defined as

input Search_where {
  title: Search_title_operator
  priority: Search_priority_operator
  doc: Search_doc_Relation
  updatedAt: Search_updatedAt_operator
  createdAt: Search_createdAt_operator
  id: Search_id_operator
  AND: [Search_where_and]
  OR: [Search_where_or]
}

input Search_doc_Relation {
  relationTo: Search_doc_Relation_RelationTo
  value: JSON
}

enum Search_doc_Relation_RelationTo {
  articles
  artists
  episodes
  hosts
  programs
  trackPlays
}

where in reality it should be something like

input Search_where {
  title: Search_title_operator
  priority: Search_priority_operator
  doc: Search_doc_Relation
  updatedAt: Search_updatedAt_operator
  createdAt: Search_createdAt_operator
  id: Search_id_operator
  AND: [Search_where_and]
  OR: [Search_where_or]
}

input Search_doc_Relation {
  relationTo: Search_doc_Relation_RelationTo_operator
  value: JSON
}

input Search_doc_Relation_RelationTo_operator {
  equals: Search_doc_Relation_RelationTo
  not_equals: Search_doc_Relation_RelationTo
  like: Search_doc_Relation_RelationTo
  contains: Search_doc_Relation_RelationTo
  in: [Search_doc_Relation_RelationTo]
  not_in: [Search_doc_Relation_RelationTo]
  all: [Search_doc_Relation_RelationTo]
  exists: Boolean
}

enum Search_doc_Relation_RelationTo {
  articles
  artists
  episodes
  hosts
  programs
  trackPlays
}

from payload.

slavanossar avatar slavanossar commented on June 17, 2024

Closed in favour of #6399

from payload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.