On 3/14/06, qvx <[EMAIL PROTECTED]> wrote:
> Job.mapper.add_property("log_events",
>     relation(LogEvent.mapper,
> primaryjoin=LogEvent.c.ndc_id==Job.c.log_ndc_id, lazy=True))

changes to

Job.mapper.add_property("log_events",
    relation(LogEvent.mapper,
        primaryjoin=LogEvent.c.ndc_id==Job.c.log_ndc_id,
        foreignkey=LogEvent.c.ndc_id,
        lazy=True)
)

See the relation options section for all the options:
http://sqlalchemy.org/docs/adv_datamapping.myt#adv_datamapping_relations_relationoptions

> Additionally, I was later hoping to extract the messages using
> LIMIT/OFFSET, but also have no idea how.
> If it can't work like this, I guess I'm just going to make plain Python
> property or utility method.

Someone else will have to cover that.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to