mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed ORA-01461 error when trying to store more than 4000 bytes in a TextField under Oracle
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -11,6 +11,7 @@ class Article(models.Model):
|
||||
pub_date = models.DateTimeField()
|
||||
status = models.IntegerField(blank=True, null=True, choices=CHOICES)
|
||||
misc_data = models.CharField(max_length=100, blank=True)
|
||||
article_text = models.TextField()
|
||||
|
||||
class Meta:
|
||||
ordering = ('pub_date','headline')
|
||||
@@ -41,5 +42,14 @@ Empty strings should be returned as Unicode
|
||||
>>> a2 = Article.objects.get(pk=a.id)
|
||||
>>> a2.misc_data
|
||||
u''
|
||||
|
||||
# TextFields can hold more than 4000 characters (this was broken in Oracle).
|
||||
>>> a3 = Article(headline="Really, really big", pub_date=datetime.now())
|
||||
>>> a3.article_text = "ABCDE" * 1000
|
||||
>>> a3.save()
|
||||
>>> a4 = Article.objects.get(pk=a3.id)
|
||||
>>> len(a4.article_text)
|
||||
5000
|
||||
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user