On Tue, Jan 5, 2016 at 11:11 AM, Paul Johnston <[email protected]> wrote:
> Hi,
>
> I have a situation where I'm trying to us a composite primary key, where one
> of the columns can be null.
>
> However, when I try to update an object I get the following error:
> sqlalchemy.orm.exc.FlushError: Can't update table test using NULL for
> primary key value on column test.id2
>
> Sample code here: http://dpaste.com/3Q8T09T
>
> Is this something SQLAlchemy can do? From some quick tests, it seems SQLite
> can do it, not sure about other databases.

NULL columns can't be primary keys in Pg - not sure if it is an ANSI
SQL standard.

-m

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to