Hello,

what is the most straightforward way of making an implicit joining of two tables in the Django development version?

The tables are created by another application and are only read in Django, and while they have a field that they can be joined on (a string) that is not explicit in the MySQL schema - so there is no
ForeignKey field in the generated Django model.

What I would like is the equivalent of

SELECT * FROM TABLE_A, TABLE_B WHERE TABLE_A.X = TABLE_B.Y;

Is there a new model needed to express this combined view?
I was hoping I can get the TableA.object.all() list and have extra subfields containing the TableB field values on each object.
select_related() and most other documentation seems to rely on having a
OneToMany relation set up.

Any pointers to the relevant documentation is welcome

thank you
Jani


--
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.

Reply via email to