On 05/09/2016 12:41 PM, Denis Rykov wrote:
> It not returning expected result:
>
> >>> [c.key for c in sorted(inspect(Venue).columns, key=lambda col:
> col._creation_order)]
> ['id', 'name', 'address']
>
> I want to get ['id', 'name', 'address_'].
>
>
> On Mon, May 9, 2016 at 9:01 PM, Mike Bayer <
mik...@zzzcomputing.com
> <mailto:
mik...@zzzcomputing.com>> wrote:
>
>
> ideally declarative would try to preserve this ordering for straight
> columns, for now you can do it like this:
>
>
> [c.key for c in sorted(inspect(Venue).columns, key=lambda col:
> col._creation_order)]
>
>
>
> On 05/09/2016 09:50 AM, Denis Rykov wrote:
>
> Thanks for quick response. I've tried your approach:
>
> Venue.__table__.columns.keys()
>
> ['id', 'name', 'address']
>
> But how I can get class attributes in the same order as real
> table columns?
>
> On Mon, May 9, 2016 at 8:31 PM, Mike Bayer
> <
mik...@zzzcomputing.com <mailto:
mik...@zzzcomputing.com>