2
votes

I'm working with Hybris and I have to write an ImpEx and pass empty string and space there. I would like to do something like this:

INSERT_UPDATE attr1[unique=true]; attr2
              "someString1"      ; ""
              "someString2"      ; " "

But the problem is that both "" and " " are recognized as null. I checked that database is able to save empty Strings (MySQL is used). And the problem is somewhere in ImpExReader. How can I pass empty space and empty string via impex? Is it possible? Hybris v5.7 is used

Many thanks

2

2 Answers

1
votes

After some investigating it turned out that ImpExReader in Hybris replaces empty strings with null and there isn't any way to pass empty string or blank string via impEx. The point is that some databases cannot hold null value and empty values are used instead. Hybris supports many databases so thats way this approach of replacing blank strings is used

0
votes

Have a look here: https://hybrismart.com/2016/10/30/mastering-hybris-impex-recipes-and-secrets/

I haven't tried it but if it doesn't work then you could go with processing the last saved item and doing it in beanshell.