pyeve / eve-sqlalchemy

SQLAlchemy data layer for Eve-powered RESTful APIs
http://eve-sqlalchemy.readthedocs.io
Other
232 stars 70 forks source link

eve-sqlalchemy breaks sqlalchemy default. #46

Closed obmarg closed 6 years ago

obmarg commented 9 years ago

We've been using eve-sqlalchemy to provide a REST API as part of a larger project, and have found that it breaks the behaviour of setting a default on a column.

Pretty sure it's this code that's to blame: https://github.com/RedTurtle/eve-sqlalchemy/blob/056b6ca836def3fb396ea3a015a04a016d601db2/eve_sqlalchemy/decorators.py#L150-L152

amleczko commented 9 years ago

Can you write a simple test or paste a trace exception?

obmarg commented 9 years ago

Test added here: https://github.com/obmarg/eve-sqlalchemy/commit/1b78e14d730bd1f150f61de2b2069f17768ba11a

obmarg commented 9 years ago

In case it wasn't obvious from the test - _created does get set correctly. It doesn't seem to get to the same point of register_column that I pointed out earlier, though I haven't figured out why.

cburchert commented 8 years ago

Any updates on this?

gabrielpjordao commented 8 years ago

+1 on this

dkellner commented 7 years ago

I've been able to confirm this myself and adapted the testcase given by @obmarg to the current master, see https://github.com/dkellner/eve-sqlalchemy/tree/fix-sqlalchemy-default.