I'm making a wiki, where a given instance of my Page class can have
many instances of my Revision class.  How do I specify an index to
improve revision.page querying?  I currently have ":index => true" at
the end of my "belongs_to" line, but that doesn't appear to create an
index properly.  Any thoughts?

class Page
  include DataMapper::Resource

  property :id,         Serial
  property :title,      String, :length => 255, :index => true

  has n, :revisions
end

class Revision
  include DataMapper::Resource

  property :id,         Serial
  property :timestamp,  DateTime
  property :text,       Text
  belongs_to :page,     :index => true
end

Cheers
--Brad
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to