[Modeling-cvs] ProjectModeling/Modeling FetchSpecification.py,1.7,1.8
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2004-09-21 18:03:38
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15040/Modeling Modified Files: FetchSpecification.py Log Message: Fixed bug #916019: FetchSpecification did not detect when an entity has no ClassDescription (usually meaning either a typo or a model not loaded yet), but assumed that one exists in setQualifier() --leading to an error in Qualifier.validateKeysWithRootClassDescription() that was not informative at all for the developer. Index: FetchSpecification.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/FetchSpecification.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FetchSpecification.py 20 Jul 2004 06:21:37 -0000 1.7 --- FetchSpecification.py 21 Sep 2004 18:03:27 -0000 1.8 *************** *** 37,43 **** def __init__(self, entityName, qualifier=None, sortOrderings=(), distinctFlag=0, deepFlag=0, hints={}): ! "Initializes the FetchSpecification" if not entityName: raise ValueError, 'entityName should be supplied' self._entityName=entityName self.setQualifier(qualifier) --- 37,55 ---- def __init__(self, entityName, qualifier=None, sortOrderings=(), distinctFlag=0, deepFlag=0, hints={}): ! """ ! Initializes the FetchSpecification ! ! :raises ValueError: if no class description can be found for the supplied ! entityName. In most cases, if not all, this means either that there is a ! typo. in entityName, or that the corresponding model has not been ! properly loaded. ! ! """ if not entityName: raise ValueError, 'entityName should be supplied' + cd=classDescriptionForName(entityName) + if not cd: + raise ValueError, 'Unable to find a ClassDescription for entityName: %s. Is the corresponding model loaded?'%entityName + self._entityName=entityName self.setQualifier(qualifier) |