-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
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
Doctrine Insert with XmlEntry #1472
Comments
Hey! As for automated casting XMLEntry to string, we would need to introduce something called EntryNormalizer and call it from the Loader like we do in JSON or CSV for example. However, there is a trick part here: we are using dbal which can handle both objects and primitives through Types. So in theory, this could be solved by registering XMLType in Dbal. That's why I'm not entirely convinced that introducing EntryNormalizer to Doctrine Adapter is a good idea. |
oh and for the not installed postgres, you should use docker to setup local services. You should find there everything you need to prepare local development environment. |
Ahh thanks to the pointer to the docs, i got it up and running locally easily enough.
I have not tried to fix the issue, but registering a new type sounds like the way to go and I may experiment with that in my local codebase to see how it goes. |
hmm but DOMElementValue should take $node->documentElement if it detects DOMDocument. I would try to look into existing function and try to figure out why it's removing html tags.
But regardless we should be able to cast XMLEntries to simple strings without losing html tags. Could you maybe try to use |
I have updated tests to show examples of both the domElementValue and the cast approaching, both do not give the expected results. |
Thank you, will fix it late today! |
Hi
If i try and insert a dataframe into a database that contains an XmlEntry, I get the following error:
Some pseduo code
I had a quick look at submitting a fix, as I managed to hack the v0.10.0 code to get it to work, however looks like I need a postgress db to run the test-suite which i don't currently have installed, and i suspect this is already fixed or easy enough for you.
I believe you need to handle it here
flow/src/lib/doctrine-dbal-bulk/src/Flow/Doctrine/Bulk/BulkData.php
Line 137 in dfde1cc
I believe something like this
As i side note are they are workarounds you can think of to transform the datatype in the row?
Closest I got was
But that strips out the html tags, which ideally i want to keep.
The text was updated successfully, but these errors were encountered: