I've got a kind of goofy schema, and I'm trying to map it.  I've got
Questionnaire types, Sections and Questions all joined in a single
association table:

join_table : type_id | section_id | question_id
questions_table : id | question_text
sections_table : id | section_name
types_table : id | type_name

So, a single question can appear in different sections for different
types.  How do I do the mapping?  This is what I've got, and it
doesn't work.

mapper(Question, questions_table)
mapper(Section, sections_table, properties={
    'questions':relation(Question, backref='section',
secondary=join_table)
})
mapper(QType, types_table, properties={
    'sections':relation(Section,
        backref = 'type',
        secondary = join_table
        primaryjoin = types_table.c.id==join_table.c.type_id,
        secondaryjoin = join_table.c.section_id==sections_table.id
        )
})


I get this error when I try to save a type object:
AttributeError: 'PropertyLoader' object has no attribute
'_dependency_processor'

Thanks,

Matt


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