Changeset 362
- Timestamp:
- 05/19/08 22:16:04 (7 months ago)
- Files:
-
- trunk/src/dm/db.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/dm/db.py
r356 r362 183 183 def get(self, className, id): 184 184 "Retreive record of domain object." 185 try: 186 id = int(id) 187 except: 188 msg = "Couldn't cast id to int for %s: %s" % (className, id) 189 raise Exception, msg 185 190 recordClass = self.getRecordClass(className) 186 191 return recordClass.get(id) # todo: pass transaction … … 1134 1139 if self.meta.attributeDbNames[name].isDomainObjectRef: 1135 1140 name += '_id' 1141 if name == 'id': 1142 value = int(value) 1136 1143 # todo: expand for all database systems 1137 1144 sqlSafeValue = sqlrepr(value, 'postgres')
