datetime objects not idempotent when a 'key' is used to rename the table

Issue #207 resolved
Former user created an issue

I've got an interesting bug using the key attribute to change column names, only on a DateTime type column, in sqlite.

Attached is a sample program that highlights it.

t1 is the table definition, the way I want to do it (i.e. I have a schema I can't change, but for consistency in the upper layers I want to refer to the column by a different name). t2 is the way that works, but unfortunately can't use to work around the problem.

Comments (5)

  1. Mike Bayer repo owner

    yah using key="somethingelse" is a very broken feature in SA....im pretty sure its hardly documented at this point since im trying to get people to not really use it...unless someone wants to come in and write a whole suite of unittests for it (not like its a bad idea, but its the like the final jenga piece for SA's current one-man-operation status ya know ?) are you using mappers with these tables? if so id recommend redefining at the mapper property level rather than at the column/key level.

    ill look at this but you might have many more probs with keys being redefined.

  2. Log in to comment