> 2) Error:
>
test_select_limited_ids_list(HasAndBelongsToManyAssociations
Test):
> ActiveRecord::StatementInvalid: OCIError: ORA-01791:
not a SELECTed expression: SELECT DISTINCT projects.id FROM
projects LEFT OUTER JOIN developers_projects ON
developers_projects.project_id = projects.id LEFT OUTER
JOIN developers ON developers.id =
developers_projects.developer_id ORDER BY projects.id,
developers.created_at
>
./test/../lib/active_record/connection_adapters/abstract_ada
pter.rb:122:in `log'
>
./test/../lib/active_record/connection_adapters/oracle_adapt
er.rb:243:in `execute'
>
./test/../lib/active_record/connection_adapters/oracle_adapt
er.rb:449:in `select'
>
./test/../lib/active_record/connection_adapters/oracle_adapt
er.rb:234:in `select_all'
> ./test/../lib/active_record/associations.rb:1188:in
`select_limited_ids_list'
> ./test/associations_test.rb:1796:in
`test_select_limited_ids_list'
From the looks of it, Oracle has the same requirement as
Postgresql,
where it requires the order by columns in a distinct query
to be in
the select clause. However, this won't be the same unless
you can
define a seperate distinct clause from the select clause
like I did
with PostgreSQL:
SELECT DISTINCT ON (projects.id) projects.id,
developers.created_at...
Does anything like this exist for Oracle? The solutions I'm
seeing
involve either subqueries or aggregates.
--
Rick Olson
http://weblog.techno-
weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---
|