On Apr 3, 11:20 am, olive <[EMAIL PROTECTED]> wrote: > Hello again, > > I've tried dumpdata after having copied back my tweaked models.py to > the Oracle powered Django project. > > After 1 minute of intensive CPU activity this message appears: > > D:\test>python manage.py dumpdata test > Traceback (most recent call last): > File "manage.py", line 11, in <module> > execute_manager(settings) > File "D:\django\core\management\__init__.py", line 272, in > execute_manager > utility.execute() > File "D:\django\core\management\__init__.py", line 219, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File "D:\django\core\management\base.py", line 72, in run_from_argv > self.execute(*args, **options.__dict__) > File "D:\django\core\management\base.py", line 86, in execute > output = self.handle(*args, **options) > File "D:\django\core\management\commands\dumpdata.py", line 41, in > handle > objects.extend(model._default_manager.all()) > File "D:\django\db\models\query.py", line 114, in __iter__ > return iter(self._get_data()) > File "D:\django\db\models\query.py", line 486, in _get_data > self._result_cache = list(self.iterator()) > File "D:\django\db\backends\oracle\base.py", line 123, in iterator > cursor.execute(full_query, params) > File "D:\django\db\backends\util.py", line 18, in execute > return self.cursor.execute(sql, params) > File "D:\django\db\backends\oracle\base.py", line 499, in execute > return Database.Cursor.execute(self, query, params) > cx_Oracle.DatabaseError: ORA-00904: "RCLENTRYALL_TMP2"."ID": invalid > identifier > > Here is the culprit: > > class RclentryallTmp2(models.Model): > symbol = models.CharField(max_length=15, blank=True) > endsymbol = models.CharField(max_length=15, blank=True) > rclentrytype = models.CharField(max_length=3, blank=True) > class Meta: > db_table = u'RCLENTRYALL_TMP2' > > class Admin: > pass > > This models is one of those for which there were no modification after > the initial inspectdb operation. > > Any idea ?
Oracle appears to be complaining about the ID column. Does the table have one? If not, does it have a primary key at all? Django expects every model to have a primary key field, which could be the problem. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

