What's the best practice for defining indexes on associations.  I've
been omitting the property declaration for foreign keys.  If I want an
index on it (which 99% of the time I expect you would), should I
declare the property along with the association?

property :unit_id, Integer, :index => true
belongs_to :unit

or would it be better to do

belongs_to :unit
index :unit_id

Also, is it on the road map for auto_upgrade to detect a missing index?

Chris

--~--~---------~--~----~------------~-------~--~----~
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