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
I first searched for info about how to do it with Doctrine until I discovered that ownCloud has its own QuoteHelper which doesn't seem to support passing null values.
->set('expiration', 'null') => the value is quoted expiration = "null"
->set('expiration', 'NULL') => the value is quoted expiration = "NULL"
->set('expiration', $qb->literal(null)) => the value is an empty string expiration = ""
I asked on the #doctrine IRC and was told that the proper syntax should be: ->set('expiration', 'null')
So, the QuoteHelper needs to be fixed to match Doctrine's way of working to avoid having further developers getting lost searching the internet for mismatching information.
@nickvergessen@DeepDiver1975 any reason why we needed the QuoteHelper in the first place ? So Doctrine isn't able to handle this properly ?
You can try it out by checking out the branch "sharing-removebogusexpirationdate-querybuilder" and running ./autotest.sh sqlite tests/lib/repair/repairinvalidshares.php
Activity
PVince81 commentedon Sep 23, 2015
You can try it out by checking out the branch "sharing-removebogusexpirationdate-querybuilder" and running
./autotest.sh sqlite tests/lib/repair/repairinvalidshares.phpnickvergessen commentedon Sep 24, 2015
The quote helper takes care of adding ` around column names, so you don't have to do that manually for oracle anymore.
Your PR can also be easily fixed by using a parameter:
But I will also fix the
'null'way. Let's hope no one ever tries to name a columnnullPVince81 commentedon Sep 24, 2015
@nickvergessen thanks a lot!