OK well that table has no primary key established.

If I create a table with a PK:

create table test (id integer primary key);

you see PRIMARY KEY in the output:

mysql> show create table test;
+-------+----------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                          
                                   |
+-------+----------------------------------------------------------------------------------------------------------+
| test  | CREATE TABLE `test` (
  `id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 |
+-------+----------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

so in this case you'd need to specify PK cols in your Table or in your mapper 
def.




On Mar 11, 2013, at 11:14 AM, Felix Schwarz <felix.schw...@oss.schwarz.eu> 
wrote:

> 
>> can you send the "SHOW CREATE TABLE", I'll copy it exactly
> 
> CREATE TABLE `links` (
>  `l_from` int(8) unsigned NOT NULL DEFAULT '0',
>  `l_to` int(8) unsigned NOT NULL DEFAULT '0',
>  UNIQUE KEY `l_from` (`l_from`,`l_to`),
>  KEY `l_to` (`l_to`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1
> 
> 
> (sorry for breaking the threading, due to some misconfiguration I saw
> Michael's mail only in the web interface.)
> 
> -- 
> 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 sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to