Skip to content

Conversation

@DanielLaranjeira063
Copy link
Contributor

Currently if you add a field called "checksum" to a Pimcore dataobject class, this will throw the following mapping error:

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"object mapping for [checksum] tried to parse field [checksum] as object, but found a concrete value"}],"type":"mapper_parsing_exception","reason":"object mapping for [checksum] tried to parse field [checksum] as object, but found a concrete value"},"status":400}
This is because the bundle itself has a checksum field being added in with the dataobject data and results in a mapping conflict with the Pimcore class field.
To fix this, I have used the bundle prefix configured by the user to name this checksum field. This prevents such conflicts.

Just like the bundle's database tables, it is always good practice to prefix this kind of things, to prevent conflicts with user developments and customization or even other bundles as well.

@fashxp
Copy link
Member

fashxp commented Jan 2, 2025

would we need a update index migration for that change as well?
and an upgrade note?

@DanielLaranjeira063
Copy link
Contributor Author

DanielLaranjeira063 commented Jan 2, 2025

would we need a update index migration for that change as well? and an upgrade note?

In my case I only needed to re-save the offending Pimcore class, but it is better to be safe than sorry, so I would say it is best to include one.

@ghost ghost added the Pimcore:ToDo label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants