On Dec 19, 5:06 pm, "Jonas H." <jo...@lophus.org> wrote: > On 12/19/2010 10:20 PM, Andy wrote: > > > Is there a way to specify JOIN using the Django ORM? The 2 tables I'm > > joining aren't related through a foreign key. > > Why don't you use a relation field in your models if your models are > related?
The tables are pre-existing. I need to do something like: SELECT * FROM TableA JOIN TableB ON TableA.id=TableB.some_id WHERE TableA.id=1 Is that something that can be done through the ORM? -- 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.