morris/lessql

Cannot have a table name with 'List' at the end or this line removes it from the table name

jgerk opened this issue · 2 comments

jgerk commented

$name = preg_replace( '/List$/', '', $name );

How many times would it happen that you need a table name ending with 'List'?

A solution would be to make this configurable:

$name = preg_replace('/'.preg_quote($this->list_suffix, '/') .'$/', '', $name);

Shouldn't "_list" suffix or "list" (lower-case) work? SQL is case insensitive. @rubenvincenten that could work, however think this is a very niche edge case...