I want to create a correct mapper with property  from a dict. ;-O

The dict information can come to me via  a Form or a web Services or a 
file, so i must create from nothing a mapper with his property too for 
the insert into....

Example:


assign_mapper(context,
              MainTable,
              tbl['main_table'],
              properties = {       'detail_table' : relation(DeatailTable),
                           })

dic = {'name': 'foo',
       'surname': 'bar',
       'detail_table': {'mansion': 1 }
      }



I've build a generic script that do a correct instance of the main 
mapper but i cannot create detail_table instance when necessary.

for_insert = MainTable()
i found that 

for_insert.mapper.properties has
{'detail_table': <sqlalchemy.orm.properties.PropertyLoader object at 
0xb70577ec>}

but how can use  this  for instantiate

for_insert.detail_table = ????



Glauco

-- 
+------------------------------------------------------------+
                                  Glauco Uri - Programmatore
                                    glauco(at)allevatori.com 
                               
  Sfera Carta Software®      [EMAIL PROTECTED]
  Via Bazzanese,69  Casalecchio di Reno(BO) - Tel. 051591054 
+------------------------------------------------------------+



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to