Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/DBIx/Class/ResultSource.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ sub reverse_relationship_info {
sub __strip_relcond {
+{
map
{ map { /^ (?:foreign|self) \. (\w+) $/x } ($_, $_[1]{$_}) }
{ map { /^ (?:foreign|self) \. (.+) $/x } ($_, $_[1]{$_}) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this regex is not DBMS-specific all new allowed characters (all of \W) seem to be relevant for MS-SQL only. So I suggest to still limit the allowed characters to those allowed in MS-SQL.

I took a quick look at https://docs.microsoft.com/en-us/sql/odbc/microsoft/column-name-limitations?view=sql-server-2017

  • ` is not allowed
  • | is not allowed

So I suggest [^`|]+.

keys %{$_[1]}
}
}
Expand Down