डाटामैपर में, कैसे एक को दो फ़ील्ड के संयोजन को निर्दिष्ट करना होगा अद्वितीय होना चाहिए। उदाहरण के लिए श्रेणियों में डोमेन के भीतर अद्वितीय नाम होना चाहिए:डेटामैपर मल्टी-फील्ड अद्वितीय इंडेक्स
class Category
include DataMapper.resource
property :name, String, :index=>true #must be unique for a given domain
belongs_to :domain
end
कहीं मैंने देखा कि नामित कुंजी इस तरह समूहबद्ध होगी। यानी: unique_index =>: नाम और डोमेन दोनों के लिए नाम। –