server/sqlutils.py
changeset 3720 5376aaadd16b
parent 3689 deb13e88e037
child 4023 eae23c40627a
child 4176 42247d70105b
equal deleted inserted replaced
3678:29f74716fd70 3720:5376aaadd16b
   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