Open GuySartorelli opened 2 years ago
you could probably look at some of the preg_match in code and change the \w
to include spaces.
e.g.
// FluentExtension.php
if (preg_match('/"(?<table>[\w\\\\]+)"\."(?<field>\w+)"/i', $sql, $matches)) {
Do you want to submit a patch for your case and test with your db with spaces?
Make sure not to try matching fields with spaces; I don't know if silverstripe supports columns with whitespace in them.
Originally opened as Silverstripe/silverstripe-framework#10259 by @marimchen
Per discussion in the original issue, spaces in table names are valid in SQL and so should be allowed by the fluent module (as opposed to presenting an error or warning as suggested above).
This is now being raised here because as per @marimchen:
It sounds like table names just aren't being quoted correctly somewhere - hopefully @marimchen can provide more specifics about exactly how this was found and how the problem presented.