I'm using the sqlalchemy-datatables library to be able to display tabular data with the jquery datatables library. One of the parameters that I need to create a DataTables object is a mapped class (model) as illustrated on line 50 of the flask example here: https://github.com/Pegase745/sqlalchemy-datatables/blob/master/examples/flask_tut/flask_tut/__init__.py . In that example, User is a mapped class, a model; columns is a list of ColumnDT objects.
My problem is, instead of the mapped class, I have a reflected table object. A reflected table object is not the same as a mapped class. I'm wondering if there's a way to make a mapped class out of the table object. I contacted the developer of the sqlalchemy-datatables package and he suggested something about automap. So I read everything on http://docs.sqlalchemy.org/en/latest/orm/extensions/automap.html but I still don't know what to do. The table I've reflected is a simple table with no foreign keys. It only has some string and integer columns. So is there a way for me to get/make a mapped class out of a reflected Table object? In my application when, I pass the Table object in place of the mapped class, I get error messages. Please help if you can. Thank you. -- 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. For more options, visit https://groups.google.com/d/optout.