Hi,
I'm posting this to the list because I don't have access to an Oracle
installation and wanted to ask people that has such a setup before opening a
ticket.
Is the regressiontests/model_inheritance_regress test working with this DB
backend?.
I have a hunch the usage of
rn_orderby = '%s.%s' % (qn(opts.db_table), qn(opts.fields[0].db_column
or opts.fields[0].column))
in the as_sql() custom Query method should be replaced with something like
rn_orderby = '%s.%s' % (qn(opts.db_table), qn(opts.pk.db_column or
opts.pk.column))
I suspect so because that's what I had to do in the SQL Server backend (that
has some similarities with ORacle for the handling of the LIMIT+OFFSET
emulation) to avoid getting references to the nonexistant id column in the
*_italianrestaurant table from the SQL query generated by the
>>> ident = ItalianRestaurant.objects.all()[0].id
test. The right column to use in that case is restaurant_ptr_id.
Something similar already happened to me with the change in the semantics of
the high_mark Query attribute introduced in r7885 and r7901 (I didn't dare to
ask Ian or Matt if a change had to be made to as_sql to detect and shortcut the
slicing when the upper limit is 0, but finally Matt confirmed with r8069 my
prediction was right) so this time I want to be sure I can help a little and
the same time validate the insight I'm acquiring about the internal of the
Query class.
Another detail I think may be necessary/more correct (although I'm not sure of
the reason) is to replace:
opts = self.model._meta
with
opts = self.get_meta()
in the same method.
Hoping to not be off mark and sound too dumb...
--
Ramiro Morales
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to
django-developers@...
To unsubscribe from this group, send email to
django-developers+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en-~----------~----~----~----~------~----~------~--~---