[sqlalchemy] reflection failure with MySQL: Mapper could not assemble any primary key columns for mapped table

2013-03-11 Thread Felix Schwarz
Hey, I'm trying to use reflection with SQLAlchemy 0.8 but I always get this exception: sqlalchemy.exc.ArgumentError: Mapper Mapper|links|links could not assemble any primary key columns for mapped table 'links' mysql show fields from links;

Re: [sqlalchemy] reflection failure with MySQL: Mapper could not assemble any primary key columns for mapped table

2013-03-11 Thread Michael Bayer
can you send the SHOW CREATE TABLE, I'll copy it exactly On Mar 11, 2013, at 9:59 AM, Felix Schwarz felix.schw...@oss.schwarz.eu wrote: Hey, I'm trying to use reflection with SQLAlchemy 0.8 but I always get this exception: sqlalchemy.exc.ArgumentError: Mapper Mapper|links|links could not

[sqlalchemy] Re: reflection failure with MySQL: Mapper could not assemble any primary key columns for mapped table

2013-03-11 Thread Felix Schwarz
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

Re: [sqlalchemy] reflection failure with MySQL: Mapper could not assemble any primary key columns for mapped table

2013-03-11 Thread Michael Bayer
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;

[sqlalchemy] Re: SQLAlchemy 0.8.0 Released

2013-03-11 Thread Alexandre Conrad
Hey Mike, Thanks the fantastic work you have been offering to the open source community over the years ! I am personally very grateful and I am sure a lot of people think the same. Maybe should you jump directly to version SQLA 1.1 as people think 1.0 versions are still immature and they would

[sqlalchemy] Inserting Entry Fastest way

2013-03-11 Thread Arkilic, Arman
Hi, I am working on a database design that I am required to use lots of tables with one-to-many relationship. As a consequence of the design, I need to insert thousands of entries. I tried session.add(), session.merge, however none of them is fast enough for me to meet the requirements. I was

[sqlalchemy] Re: Inserting Entry Fastest way

2013-03-11 Thread Russ
On Monday, March 11, 2013 4:56:11 PM UTC-4, Arkilic, Arman wrote: Hi, I am working on a database design that I am required to use lots of tables with one-to-many relationship. As a consequence of the design, I need to insert thousands of entries. I tried session.add(), session.merge,

Re: [sqlalchemy] Inserting Entry Fastest way

2013-03-11 Thread Michael Bayer
I wrote a detailed description of what's going on regarding INSERT here: http://stackoverflow.com/questions/11769366/why-is-sqlalchemy-insert-with-sqlite-25-times-slower-than-using-sqlite3-directly/11769768#11769768 On Mar 11, 2013, at 4:56 PM, Arkilic, Arman arki...@bnl.gov wrote: Hi, I am

[sqlalchemy] Should an empty HSTORE be returned as an empty dict?

2013-03-11 Thread Charles-Axel Dein
Hi, Currently, when getting an empty HSTORE column from a model instance, it is returned as None. Do you think it would be more logical to have it returned as an empty dict? Thanks, Charles -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

Re: [sqlalchemy] Re: Inserting Entry Fastest way

2013-03-11 Thread Warwick Prince
Thanks Russ - took a look and found it very interesting indeed. Cheers Warwick On Monday, March 11, 2013 4:56:11 PM UTC-4, Arkilic, Arman wrote: Hi, I am working on a database design that I am required to use lots of tables with one-to-many relationship. As a consequence of the design, I

Re: [sqlalchemy] Inserting Entry Fastest way

2013-03-11 Thread Michael Bayer
On Mar 11, 2013, at 5:19 PM, Russ russandheat...@gmail.com wrote: On Monday, March 11, 2013 4:56:11 PM UTC-4, Arkilic, Arman wrote: Hi, I am working on a database design that I am required to use lots of tables with one-to-many relationship. As a consequence of the design, I need to

Re: [sqlalchemy] Inserting Entry Fastest way

2013-03-11 Thread Russ
wow that is a great talk, I laughed my ass off and you really got in there, nice job ! Thanks! As long as you weren't laughing because I did the sqlalchemy all wrong! :) Russ -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To