#1431 confirmed
Mike Stenhouse

Stack level too deep when collecting relations

Reported by Mike Stenhouse | October 12th, 2010 @ 06:26 AM

While trying to jsonify a collection of objects and include their relations I've stumbled across what I assume is a bug. I've boiled it down to a test case and it seems to be something more fundamental than serialisation.

Test case and a couple of specs are attached. The stack trace looks like:

stack level too deep
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/resource.rb:635:in `collection'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/collection.rb:510:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/support/lazy_array.rb:413:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/support/lazy_array.rb:413:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/collection.rb:508:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/comparison.rb:616:in `map'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/comparison.rb:616:in `expected'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/comparison.rb:461:in `matches?'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/operation.rb:461:in `matches?'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/operation.rb:159:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/operation.rb:159:in `each'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/operation.rb:461:in `all?'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/query/conditions/operation.rb:461:in `matches?'
/Library/Ruby/Gems/1.8/gems/dm-core-1.0.2/lib/dm-core/resource.rb:635:in `collection'

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Attachments

Pages