From: Richard B. <rb...@us...> - 2004-10-06 07:44:51
|
Update of /cvsroot/jcframework/dotnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12660 Modified Files: CClassMap.vb CPersistenceBroker.vb Log Message: Fix for code based attribute mappings using superclasses with OID/GUID keys Index: CPersistenceBroker.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CPersistenceBroker.vb,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** CPersistenceBroker.vb 28 Sep 2004 07:30:32 -0000 1.58 --- CPersistenceBroker.vb 6 Oct 2004 07:44:28 -0000 1.59 *************** *** 1795,1804 **** AttrMap.ColumnMap = colMap AttrMap.IsProxy = True - If Not afTable.KeyReference Is Nothing And Not afTable.SuperClass Is Nothing Then - refAttr = ClassMap.SuperClass.getAttributeMapByString(afTable.KeyReference, True) - If Not refAttr Is Nothing Then - AttrMap.AttributeMap = refAttr - End If - End If Try AttrMap.ColumnMap.StorageSize = cc.Item(AttrMap.ColumnMap.Name) --- 1795,1798 ---- *************** *** 1881,1884 **** --- 1875,1892 ---- 'Create a column map for the sharedtablefield colMap = New CColumnMap + If afTable.DBKey = AFTableAttribute.KeyType.useGUIDValue Or afTable.DBKey = AFTableAttribute.KeyType.useOIDValue Then + Select Case afTable.DBKey + Case AFTableAttribute.KeyType.useOIDValue + AttrMap = ClassMap.getAttributeMapByString("OIDValue", False) + Case AFTableAttribute.KeyType.useGUIDValue + AttrMap = ClassMap.getAttributeMapByString("GUIDValue", False) + End Select + If Not afTable.KeyReference Is Nothing And Not afTable.SuperClass Is Nothing Then + refAttr = ClassMap.SuperClass.getAttributeMapByString(afTable.KeyReference, True) + If Not refAttr Is Nothing Then + AttrMap.AttributeMap = refAttr + End If + End If + End If Try colMap.StorageSize = cc.Item(ClassMap.SharedTableField) Index: CClassMap.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/CClassMap.vb,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** CClassMap.vb 28 Sep 2004 04:18:54 -0000 1.29 --- CClassMap.vb 6 Oct 2004 07:44:25 -0000 1.30 *************** *** 731,735 **** Throw New NoAttributeMapException([String].Format("Attribute map not found for ""{0}"" in class {1}. Please check spelling and case", Name, Me.Name)) End If ! getAttributeMapByString = am End Function --- 731,735 ---- Throw New NoAttributeMapException([String].Format("Attribute map not found for ""{0}"" in class {1}. Please check spelling and case", Name, Me.Name)) End If ! Return am End Function |