Fixed #20292: Pass datetime objects (not formatted dates) as params to Oracle

This seems worthwhile in its own right, but also works around an Oracle
bug (in versions 10 -- 11.1) where the use of Unicode would reset the
date/time formats, causing ORA-01843 errors.

Thanks Trac users CarstenF for the report, jtiai for the initial patch,
and everyone who contributed to the discussion on the ticket.
This commit is contained in:
Shai Berger 2014-03-12 23:43:45 +02:00
parent fc79c3fb3d
commit 6983201cfb
3 changed files with 63 additions and 17 deletions

View file

@ -76,6 +76,12 @@ class BooleanModel(models.Model):
string = models.CharField(max_length=10, default='abc')
class DateTimeModel(models.Model):
d = models.DateField()
dt = models.DateTimeField()
t = models.TimeField()
class PrimaryKeyCharModel(models.Model):
string = models.CharField(max_length=10, primary_key=True)