Hi Folk, I'm finding difficult implement this features of SA .....

The example is:  a simple table with a column "type".  I want to do a 
secondary mapper based on the primary mapper with the only different in 
the column type='something'


create table person(
   name text,
   type text);


class Person ( Obj ):
    pass
assign_mapper(context,
              Person,
              tbl['person'],
              column_prefix = 'person_',
              extension = SelectResultsExt(),
              properties = {
                bla bla
              })


class Blonde( Person ):
  pass

assign_mapper(context,
              Blonde,
              select( [tbl['anagrafica']], tbl['anagrafica'].c.tipo == 
'P').alias('blonde'),
              non_primary = True,
              )



This cause a lot of inspiegable problem to property that are perfecly 
functional in the primary
sqlalchemy.exceptions.ArgumentError: Can't determine relation direction 
for relationship 'Blabla.comune_nascita (Comune)' - foreign key columns 
are present in neither the parent nor the child's mapped tables



Some ideas?


Glauco

















-- 
+------------------------------------------------------------+
                                  Glauco Uri - Programmatore
                                    glauco(at)allevatori.com 
                               
  Sfera Carta Software(r)      [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