Thanks.  The FAQ makes sense and I shouldn't be doing that.  I've
solved my problem by using the below table creation code.  I've added a
separate ID to be the primary key and also a unique index on what was
my original primary key.

signal_enumerations = sqla.Table('signal_enumerations', metadata,
    sqla.Column('signal_enumeration_id',
                sqla.Integer,
                primary_key = True),
    sqla.Column('signal_type_id',
                sqla.Integer,
                sqla.ForeignKey('signal_types.signal_type_id'),
                nullable = False),
    sqla.Column('signal_enumeration_name',
                sqla.String(50),
                nullable = False),
    sqla.Column('signal_enumeration_value',
                sqla.Integer,
                nullable = False),
    sqla.UniqueConstraint('signal_type_id',
                          'signal_enumeration_name',
                          name = 'signal_enumerations_idx1')
    )


On Nov 4, 12:00 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote:
> by setting "signal_enumeration_name" to "thirty" on an in-session
> instance, youre modifying a primary key value in place.  See the FAQ on
> this:
>
> http://www.sqlalchemy.org/trac/wiki/FAQ#asingleobjectsprimarykeycanch...


--~--~---------~--~----~------------~-------~--~----~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to