Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created November 8, 2011 22:39
Show Gist options
  • Select an option

  • Save jfirebaugh/1349531 to your computer and use it in GitHub Desktop.

Select an option

Save jfirebaugh/1349531 to your computer and use it in GitHub Desktop.
# Sequel 3.28
>> Report.select(:id).eager_graph(:user)
=> #<Sequel::JDBC::SQLServer::Dataset: "SELECT [reports].[id], [user].[id] AS [user_id], [user].[computer_group_id], [user].[deleted], [user].[username], [user].[version], [user].[password_hash], [user].[last_login_time], [user].[linked_datasource_id], [user].[email_address], [user].[contact_info], [user].[tz_offset], [user].[api_token], [user].[locale] FROM [reports] INNER JOIN [users] AS [user] ON ([user].[id] = [reports].[user_id])">
# Sequel 3.29
>> Report.select(:id).eager_graph(:user)
=> #<Sequel::JDBC::SQLServer::Dataset: "SELECT [id], [reports].[id], [user].[id] AS [user_id], [user].[computer_group_id], [user].[deleted], [user].[username], [user].[version], [user].[password_hash], [user].[last_login_time], [user].[linked_datasource_id], [user].[email_address], [user].[contact_info], [user].[tz_offset], [user].[api_token], [user].[locale] FROM [reports] INNER JOIN [users] AS [user] ON ([user].[id] = [reports].[user_id])">
NativeException: com.microsoft.sqlserver.jdbc.SQLServerException: The column 'id' was specified multiple times for 't1'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment