On Dec 18, 2009, at 10:15 AM, Peter Herndon wrote: >> >> The error message came from command: python manage.py syncdb >> Creating table ldap_groups_ldapgroup >> Traceback (most recent call last): >> > [snip] >> cx_Oracle.DatabaseError: ORA-02329: column of datatype LOB cannot be >> unique or a >> primary key >> > > In ldap_groups/models.py, the LDAPGroup.org_unit field is a TextField, and is > marked unique=True. I'm thinking that the cx_Oracle backend is translating > the TextField into a Large Object (LOB) field in Oracle, and Oracle cannot > ensure uniqueness of a Large Object. In short, remove the "unique=True" from > the ldap-groups code and try again. It should work after that. > > This error arises from an inconsistency between the behavior of Oracle and > the behavior of PostgreSQL, as Mike noted. It works under Postgres. I'll > check with the dev list and see if this behavior difference is known, and > whether the fix is to never use unique=True on a TextField (a bug in my > code), or something that needs to be smoothed over in the SQL generation for > Oracle specifically (a bug in the underlying Django behavior). >
Hi Wayne, The limitation is known, there's a note in the Oracle backend mentioning that TextFields do not support indexes, which includes unique constraints. For your use, just remove the unique=True from the model definition and run syncdb again. Regards, ---Peter -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.