~mehmetgencer/mompy/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
2011-04-11:
	* Added performance and functionality tests.
	
2011-04-07:
	* Added ReferenceField, ReferenceListField, and ReferenceDictField data types for object mapping. These data types allow 
	referencing other objects. For example:
	
		class C(DBObject):
			i = IntegerField()
			
		class D(DBObject):
			other = ReferenceField(target=C)
			
		C.other = ReferenceField(target=D)
	
	ReferenceListField and ReferenceDictField are similar but contains a list of references, and
	a dictionary whose values are references, respectively. e.g.:
	
	    C.children=ReferenceListField(target=C)
	    C.namedChildren=ReferenceDictField(target=C)
	    
	Self references or circular references are OK (unlike pymongo autoreference facilities)
	 since dereferencing is made when the field is demanded
	The reference fields can reference to documents in other databases
	
	When the target option is omitted, the type/class of the referenced object is not checked, and any mongo object is OK
	When the target is a string, it is used as the class name, but the class must be accessible in context  
2011-04-02:
	* Added a function ensureIndex() to access ensure_index of PyMongo. For example:
	
		class C(DBObject):
			i = IntegerField()
		
		ensureIndex(C,"i")
		
2011-04-01:
	* Implemented support for class hierarchies. Now a descendant of DBObject can be subclassed. As part of
	  this change, it turned a lot practical to make Query as a method return value instead of a class attribute.
	  Thus the queries are now used as SomeClass.getObjects().find(...), etc., instead of SomeClass.objects.find(...) 
	
2011-03-31:
	* Added list and dict type fields
	
2011-03-29:
    * Fixed test for uniqueness to work OK

2011-03-24 version 0.2:
    *Fixed Python 2 compatibility problem due to sring type being unicode when retrieved from DB.
    Running the module now as "python2or3 mompy/mompy.py" should succeed for both Python 2 and 3
    
    *Converted database connection to a singleton class for better management in the future.
    However it does not yet support using a mix of databases