Skip to content

Failed to retrieve primary key for SQLServer 12 #512

@doe300

Description

@doe300

Running on branch rails5 on latest code (rails5@bec007e), retrieving a primary key (GUID) for a table fails with this error:

undefined method `second' for nil:NilClass

thrown in

lib/arel/visitors/sqlserver.rb, line 193 in method 'primary_Key_From_Table'

Debugging shows, that the schema_cache is empty (there are no schemas for any table).

This issue only occurs with SQLServer 12. Running the same app against a SQLServer 11 with the same database does not fail, and the schema_cache contains correct values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions