equal
deleted
inserted
replaced
227 to insert/update an entity into a SQL database |
227 to insert/update an entity into a SQL database |
228 """ |
228 """ |
229 attrs = {} |
229 attrs = {} |
230 eschema = entity.e_schema |
230 eschema = entity.e_schema |
231 for attr, value in entity.items(): |
231 for attr, value in entity.items(): |
232 rschema = eschema.subject_relation(attr) |
232 rschema = eschema.subjrels[attr] |
233 if rschema.is_final(): |
233 if rschema.final: |
234 atype = str(entity.e_schema.destination(attr)) |
234 atype = str(entity.e_schema.destination(attr)) |
235 if atype == 'Boolean': |
235 if atype == 'Boolean': |
236 value = self.dbhelper.boolean_value(value) |
236 value = self.dbhelper.boolean_value(value) |
237 elif atype == 'Password': |
237 elif atype == 'Password': |
238 # if value is a Binary instance, this mean we got it |
238 # if value is a Binary instance, this mean we got it |