Hi Jean-Luc,

I wish I'd seen your post earlier, I could've helped. :) I had this exact 
same problem today, found your post by searching for "sqlacodegen table 
class."

Something in this semi-unrelated post 
<https://groups.google.com/d/msg/sqlalchemy/uQ7MijlHW1Y/3xaA7vJ6BwAJ> by 
Mike Bayer prompted me to check to see what was different about the tables 
for which proper classes were generated and the others. I found that they 
were missing a primary key; adding one and re-running sqlacodegen did 
indeed solve my problem. For tables lacking primary keys, sqlacodegen 
simply creates a Table variable, rather than a class as you would expect. 

Hopefully this can still help someone else in this situation, who comes 
here searching for a resolution.

Cheers,
Kevin

On Tuesday, May 24, 2016 at 12:35:43 PM UTC-4, Jean-Luc Menut wrote:
>
>
> But some of them are converted as variables, such as : 
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
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 https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to