On 05.11.2015 15:59, José Tomás Tocino García wrote:


    Well first, inspectdb does only processes tables. As I understood
    your case involves views which are not traversed by Django.


Are you sure about that? inspectdb calls connection.introspection.table_names(cursor) that, in the case of Oracle, calls oracle.introspection.DatabaseIntrospection.get_table_list which queries BOTH tables AND views:

        """
        Returns a list of table and view names in the current database.
        """
cursor.execute("SELECT TABLE_NAME, 't' FROM USER_TABLES UNION ALL "
                       "SELECT VIEW_NAME, 'v' FROM USER_VIEWS")



Listing views as well is a relatively new feature (added to 1.8):
https://github.com/django/django/commit/b8cdc7dcc3fc6897fb2a75f90023f5c67aad327f

That was a bit surprise. Specially that functionality is really undocumented.

https://docs.djangoproject.com/en/1.8/ref/django-admin/#inspectdb

Documentatiuon states that it introspects tables, not views.

Documentation states that inspectdb works ith PostgreSQL, MySQL and SQLite. There is no mention of Oracle at all.

--

Jani Tiainen

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/563C4CD4.908%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to