Hi all,
I'm trying to manage a form using sprox , but I have some troubles with
primary keys.
Seems sprox wants the primary key as an increment column (serial
postgres), autoincrement mysql, etc.).
In my case the table has a text column as primary key like this one:
mytable(code varchar(5), description varchar(200))
It works in edit mode (but the "code" column is readonly),
anyway, when I try to insert a new record, the 'code' column is missing
in the
form and when I submit data I get the following error:
|
FlushError: Instance <Movie at 0x27e12d0> has a NULL identity key. If
this is an auto-generated value, check that the database table allows
generation of new primary key values, and that the mapped Column object
is configured to expect these generated values. Ensure also that this
flush() is not occurring at an inappropriate time, such as within a
load() event.
|
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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 http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.