mdoar wrote:
>
> Makes sense. Since I'm using reflection and declarative, I have code
> like
>
>                 aTable = Table(tablename, Base.metadata,
>                                Column('dbid', primary_key=True),
>                                Column('state', index=True),
>                                useexisting=True)
>                 ....
>                 clz = type(classname, (Base,), {'__table__' : aTable})
>
> and then define a relation later on with:
>
>         Defect.stateObj = orm.relation(Statedef,
>
> primaryjoin=Defect.state==Statedef.id,
>                                        foreign_keys=
> [Statedef.__table__.columns['id'] ])

i think you mean to say here that foreign_keys=Defect.state.  if the
foreign keys are on the "other" side, thats one to many.

>> 1. strongly referenced somewhere, or weak_identity_map=False on your
>> session.  else the object is garbage collected and SQL is required to
>> load
>> it.
>
> weak_identity_map=False is the default. Looking at the documentation,
> perhaps you meant "weak_identity_map=True"?

True is the default in 4 and above and it seems like the docstring has it
backwards, so that is fixed in r5903.


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to