
Lazy Contexts gone again
Reported by Kabari | February 12th, 2010 @ 08:23 PM | in 1.1
per
http://groups.google.com/group/datamapper/browse_thread/thread/8215...
referenced in ticket #962 but I couldn't reopen it.
Comments and changes to this ticket
-
-
Kabari March 9th, 2010 @ 09:27 AM
- Assigned user set to Dan Kubb (dkubb)
-
Dan Kubb (dkubb) May 29th, 2010 @ 01:59 AM
- State changed from new to unconfirmed
- Assigned user cleared.
-
Xavier Shay December 2nd, 2010 @ 11:32 PM
- State changed from unconfirmed to confirmed
- Milestone order changed from 0 to 0
Confirmed lazy loading does not work as expected, it generates two queries rather than one.
require 'rubygems' require 'dm-core' require 'dm-migrations' DataMapper::Logger.new($stdout, :debug) DataMapper.setup(:default, 'sqlite3://:memory:') class Post include DataMapper::Resource property :id, Serial property :name, String, :lazy => [:show] property :volume, Integer, :lazy => [:show] property :idea, String, :lazy => [:report] end Post.auto_migrate! Post.create(:name=>'Dan',:volume=>5,:idea=>'moo') post = Post.first post.name post.volume
-
Xavier Shay December 2nd, 2010 @ 11:39 PM
Kabari do you have your patch around anywhere? Github links are broken...
-
Kabari December 13th, 2010 @ 08:37 PM
@Xavier: I deleted my dm-core repo and reforked, and forgot about this. I remember what it was though, so I'll make a new patch.
-
Kabari December 13th, 2010 @ 11:26 PM
- Assigned user set to Xavier Shay
Here's a more permanently located patch :) https://gist.github.com/740035
-
Dan Kubb (dkubb) December 17th, 2010 @ 09:07 PM
- State changed from confirmed to resolved
(from [3c922a91536cd5f4b96006977c43ce6065b3e8e8]) Lazy load all properties in a group together.
This fixes the example script in the ticket.
[#1197 state:resolved]
Signed-off-by: Kabari Hendrick kabari@gmail.com
https://github.com/datamapper/dm-core/commit/3c922a91536cd5f4b96006... -
Martin Gamsjaeger (snusnu) December 18th, 2010 @ 08:59 AM
- Milestone set to 1.1
- Milestone order changed from 195091 to 0
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Tags
Referenced by
-
1341 lazy loading groups broken I found a duplicated version here #1197 and maybe here #962
-
1197 Lazy Contexts gone again [#1197 state:resolved]
-
1341 lazy loading groups broken This is closed with #1197