I have just started using Python and TurboGears with SQLAlchemy and I
think its great so far.  I am working with an already-created database
and am wondering what the best way is to represent the relationships
between the recurring_task and employee_status table:

employee_statuses = Table('employee_status', metadata,
                        #Column('emp_id', Integer, primary_key=True),
                        autoload=True)
recurring_tasks = Table('recurring_task', metadata,
                        #Column('rt_id', Integer, primary_key=True),
                        autoload=True)
class Employee_status(object):
    pass
class Recurring_task(object):
    pass
employee_status_mapper = mapper(Employee_status, employee_statuses)
recurring_task_mapper = mapper(Recurring_task, recurring_tasks)

So far, so good - this works in the tg-admin shell.  recurring_task
has three columns, rt_raiser, rt_owner and rt_status which are all
instances of employee_status.  I would be grateful if somebody could
indicate the best way to represent these relationships in the model as
I'm not sure which of the many examples in the documentation is
relevant - I am worried because I have one table referencing another
table multiple times.

Many thanks

Jon

--~--~---------~--~----~------------~-------~--~----~
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