E&S CVS Commit: PEAK - Improved handling for returning non-Persistent objects from a DM. The XMI

pje at eby-sarna.com pje at eby-sarna.com
Wed Dec 18 17:14:00 EST 2002


Module Name:	PEAK
Committed By:	pje
Date:		Wed Dec 18 22:13:16 UTC 2002

Modified Files:
	PEAK/src/peak/storage: data_managers.py xmi.py

Log Message:
Improved handling for returning non-Persistent objects from a DM.  The XMI
DM didn't work right when there was a circular reference between two
non-Persistent objects (i.e. 'Multiplicity' and 'MultiplicityRange' in
UML models).  The trick is that you have to put a newly created
non-Persistent object into the cache *before* you initialize its state.
This ensures that things that it references, that reference it, will be
able to refer to it in *their* state.

Unfortunately, this doesn't fix a much larger problem with the XM
implementation: inverse relationship links aren't automatically generated.
:(  This means, for example, that in UML models classes don't know what
associations they're members of, even though in principle the UML metamodel
allows them to know that.  I don't think there's any way to fix this,
however, that doesn't require converting the entire XMI file into objects
up-front.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/storage/data_managers.py.diff?r1=1.10&r2=1.11
http://cvs.eby-sarna.com/PEAK/src/peak/storage/xmi.py.diff?r1=1.9&r2=1.10

To generate a diff of this commit:
cvs rdiff -r1.10 -r1.11 PEAK/src/peak/storage/data_managers.py
cvs rdiff -r1.9 -r1.10 PEAK/src/peak/storage/xmi.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list