firedird date type reflected as datetime instead of date
In firebird.py
class FBDate(sqltypes.DateTime):
should be
class FBDate(sqltypes.Date):
Comments (5)
-
Account Deleted -
I'm somewhat surprised by this, and never noticed a bad behaviour on DATEs. There is a test that explicitly checks the case (see tests/dialect/test_firebird.py): is that failing for you? If so, could you cook up a test recipe that triggers the wrong reflection?
Note also that the types handling changed dramatically in SA 0.6.
-
Account Deleted Ok, i wasn't precise enough. The introspection code is ok, and tests are ok too. I get back FBDate type for a Date field.
The problem is that the result isinstance(mytable.c.mydatecolumn.type, sqlalchemy.types.DateTime) is True, koz FBDate class was derived from sqlalchemy.types.DateTime, instead of sqlalchemy.types.Date. I just notice it's defined correctly for other databases, f.e.: class PGDate(sqltypes.Date): or class MSDate(sqltypes.Date):
The problem can be reproduce with formalchemy. It decides the fields output format from (auto)reflected columns types.
-
repo owner this issue doesn't exist in 0.6 where FBDate no longer exists. made the change for 0.5 in ce08837f0e945140c7ec7c3c37a364a235d84312. if any issues the ticket can be reopened.
-
repo owner - removed milestone
Removing milestone: 0.5.xx (automated comment)
- Log in to comment
Duh, i mistyped Firebird in the summary field :( Btw. i tested it on Linux with
firebirdsql 2.1.2 sqlalchemy 0.5.6 kinterbasdb 3.3.0