Hello Adrian, 2009/5/22 Adrian von Bidder <avbid...@fortytwo.ch>: > On Friday 22 May 2009 08.43:09 Alexandre Conrad wrote: >> Don't you want that non-null column to be a foreign key ? > > Would that make a difference?
That's what a foreign key is used for: http://en.wikipedia.org/wiki/Foreign_key I think you should know what a foreign key is before using a tool like SQLAlchemy. SQLAlchemy is an abstraction layer to deal with cells, records, columns, tables, relations of databases. An abstraction layer hides some details of lower level concepts. Abstraction layers like SQLA are meant to ease your everyday work. But you still have to understand lower level concepts in order to correctly use abstraction tools like SQLAlchemy. What you are trying to achieve is already a feature that the database itself can handle for you. It's called a constraint. Read a few papers about databases in general and how constraints and relations between tables work. There's a lot of documentation about that out there. Have fun! :) Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---