Hi
 I am following the documentation about lazy loading properties. I
especially liked the concept of grouping the lazy loading properties
together. So I tried it. But when I look at the sql it does not really
happen as expected.

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.first.name

When I look at query for ( Post.first.name ) I see only the name
property loaded, not the name and volume together which I thought was
supposed to happen since they are in the same lazy :show group.
 Am I doing something wrong?

~ Dan

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to datamap...@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to