> if you want to do it that way without telling SA about the collection
> relation between the two entries, it has no way to "guess" what the
> foreign key id should be - you'd need to populate the foreign key
> identifier explicitly on your log entry:
>
> session.save(user)
> session.flush()
>
> log_entry.user_id = user.id
> session.save(log_entry)
> session.flush()

Thanks Michael!  Now that I understand that there's no magic
connection
between the foreignKey id, and the mapped object, it's making sense.
If
I use IDs in my assignments, then it will work as I expect.

I'm now a fan of SQLAchemy... it has the clarity, completeness, and
flexibility that I was looking for, and most importantly, it has
Michael
helping us up the learning curve!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to