Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees
In directory sc8-pr-cvs1:/tmp/cvs-serv29024/tests/testPackages/StoreEmployees
Modified Files:
Tag: brch-0_9pre7-1-PyModel
pymodel_StoreEmployees.py
Log Message:
Removed useless defaults for RToOne/RToMany, added defaults for associations, and updated the model so that the delete rules for relationships created by Associations are the same than in the xml model
Index: pymodel_StoreEmployees.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees/Attic/pymodel_StoreEmployees.py,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** pymodel_StoreEmployees.py 18 May 2003 16:03:30 -0000 1.1.2.2
--- pymodel_StoreEmployees.py 19 May 2003 10:37:23 -0000 1.1.2.3
***************
*** 16,28 ****
AString.defaults['width'] = 30
! RToOne.defaults['delete'] = 'nullify'
! RToOne.defaults['multiplicity'] = [0,1]
! #RToOne.defaults['sourceAttribute'] = RToOne.attNameFromRel # 'fk'+destEnt+destAtt+count
! #RToOne.defaults['destinationAttribute'] = 'id'
!
! RToMany.defaults['delete'] = 'cascade'
! RToMany.defaults['multiplicity'] = [0,None]
! #RToMany.defaults['sourceAttribute'] = 'id'
! #RToMany.defaults['destinationAttribute'] = RToMany.attNameFromRel # fk+destEnt+sourceAtt+count
# Note that Relation.attNameFromRel is a callable, that calculates the att
--- 16,20 ----
AString.defaults['width'] = 30
! Association.defaults['delete']=['nullify', 'nullify']
# Note that Relation.attNameFromRel is a callable, that calculates the att
***************
*** 80,89 ****
Association('Mark', 'Executive',
relations=['executive', 'marks'],
keys=['FK_Executive_id', 'id']),
Association('Address', 'Employee',
relations=['toEmployee', 'toAddresses'],
! keys=['fkEmployeeId', 'id']),
Association('Employee', 'Store',
relations=['toStore', 'employees'],
keys=['fkStoreId', 'id']),
]
--- 72,85 ----
Association('Mark', 'Executive',
relations=['executive', 'marks'],
+ delete=['nullify', 'cascade'],
keys=['FK_Executive_id', 'id']),
Association('Address', 'Employee',
relations=['toEmployee', 'toAddresses'],
! delete=['deny', 'cascade'],
! keys=['fkEmployeeId', 'id'],
! ),
Association('Employee', 'Store',
relations=['toStore', 'employees'],
+ delete=['nullify', 'deny'],
keys=['fkStoreId', 'id']),
]
|