We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We are trying to use the keyField parameter to use _id instead of id
_id
id
_id: { type: "string", primaryKey: true },
country: { type: "string", required: true, populate: { keyField: "_id", action: "countries.get", }, },
But we are getting validation errors on countries.get saying that _id is undefined. Seems like id is hardcoded?
countries.get
database/src/transform.js
Lines 186 to 190 in 3e962ec
Here's a workaround we found:
country: { type: "string", required: true, populate: async (ctx, values, entities, field) => { return Promise.all( entities.map( async (entity) => (entity.postCount = await ctx.call( "countries.get", { _id: entity.country } )) ) ); }, },
The text was updated successfully, but these errors were encountered:
It seems that error reporting sometimes also ignores FieldKey:
{ "name": "EntityNotFoundError", "message": "Entity not found", "code": 404, "type": "ENTITY_NOT_FOUND", "data": { "id": "5431" } }
(this is from a DELETE, note the id instead of _id)
DELETE
Sorry, something went wrong.
try this: fields: { id: { columnName: "_id", type: "string", primaryKey: true }
No branches or pull requests
We are trying to use the keyField parameter to use
_id
instead ofid
But we are getting validation errors on
countries.get
saying that_id
is undefined. Seems likeid
is hardcoded?database/src/transform.js
Lines 186 to 190 in 3e962ec
Here's a workaround we found:
The text was updated successfully, but these errors were encountered: