http://code.google.com/p/boto/source/detail?r=1321
Modified:
/trunk/boto/sdb/db/property.py
=======================================
--- /trunk/boto/sdb/db/property.py Mon Oct 12 10:03:57 2009
+++ /trunk/boto/sdb/db/property.py Thu Oct 15 14:12:10 2009
@@ -347,7 +347,7 @@
if hasattr(self.reference_class, self.collection_name):
raise ValueError, 'duplicate property: %s' %
self.collection_name
setattr(self.reference_class, self.collection_name,
- _ReverseReferenceProperty(model_class, property_name))
+ _ReverseReferenceProperty(model_class, property_name,
self.collection_name, self.reference_class))
def check_uuid(self, value):
# This does a bit of hand waving to "type check" the string
@@ -374,10 +374,14 @@
self.check_instance(value)
class _ReverseReferenceProperty(Property):
-
- def __init__(self, model, prop):
+ data_type = Query
+ type_name = 'query'
+
+ def __init__(self, model, prop, name, reference_class):
self.__model = model
self.__property = prop
+ self.name = name
+ self.item_type = reference_class
def __get__(self, model_instance, model_class):
"""Fetches collection of model instances of this collection
property."""