You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty string gets stored in the DB as an empty string.
Actual behavior
Empty string gets stored in DB as null. This causes issues with the resolver as it can't find the existing object (I assume it tries to do '' = null in the filter):
Steps to reproduce
Data source should have a field whose value is ''
Define element look up based on that field
Assing that field in mapping
Run importer twice. Once to create the object and then again to see look up failure.
Some combination of Pimcore / Symfony / Doctrine look to be storing the empty string as null in the database
When the importer runs again and does a lookup to check if the object exists, it queries the database for empty string and does not find a match (since it is stored as null).
The importer then tries to create a new object which fails since the object does already exist. (unique constraint on key which is made of that attribute)
Any fix here? Ideally we can get empty string to store as empty string. As a short term fix, the look up should correctly handle looking up empty string as is null or = ''.
Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.
Expected behavior
Empty string gets stored in the DB as an empty string.
Actual behavior
Empty string gets stored in DB as
null
. This causes issues with the resolver as it can't find the existing object (I assume it tries to do'' = null
in the filter):Steps to reproduce
''
Related: #211
The text was updated successfully, but these errors were encountered: