Re: Help to implement join query in django orm

2022-07-25 Thread 'Amitesh Sahay' via Django users
10. How to perform join operations in django ORM? — Django ORM Cookbook 2.0 documentation (agiliq.com) Try this On Monday, 25 July, 2022 at 01:18:44 pm IST, Mihir Patel wrote: is anyone having login issue? , i am unable to authenticate a user in my website On Sun, Jul 24, 2022 at

Re: Help to implement join query in django orm

2022-07-25 Thread Mihir Patel
is anyone having login issue? , i am unable to authenticate a user in my website On Sun, Jul 24, 2022 at 10:37 PM Jitendra kumar Patra < jitendrapatra...@gmail.com> wrote: > Ping me 7008080545 > > On Fri, 22 Jul, 2022, 12:16 Avi shah, wrote: > >> I have two tables >> Tbl 1 >> & >> Tbl 2 >> >> I

Re: Help to implement join query in django orm

2022-07-24 Thread Jitendra kumar Patra
Ping me 7008080545 On Fri, 22 Jul, 2022, 12:16 Avi shah, wrote: > I have two tables > Tbl 1 > & > Tbl 2 > > I need to connect the two tables using a join > > > Thanks and regards, > Avi shah > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group

Re: Help to implement join query in django orm

2022-07-24 Thread Abhishek Gupta
Hey, you have to write custom raw query for join tables which are not connected with foreign key relationship in django. On Sun, Jul 24, 2022, 11:17 Lalit Suthar wrote: > this can be helpful > > https://betterprogramming.pub/django-select-related-and-prefetch-related-f23043fd635d > > On Sun, 24

Re: Help to implement join query in django orm

2022-07-23 Thread Lalit Suthar
this can be helpful https://betterprogramming.pub/django-select-related-and-prefetch-related-f23043fd635d On Sun, 24 Jul 2022 at 00:30, Ryan Nowakowski wrote: > On Fri, Jul 22, 2022 at 12:16:14PM +0530, Avi shah wrote: > > I have two tables > > Tbl 1 > > & > > Tbl 2 > > > > I need to connect the

Re: Help to implement join query in django orm

2022-07-23 Thread Ryan Nowakowski
On Fri, Jul 22, 2022 at 12:16:14PM +0530, Avi shah wrote: > I have two tables > Tbl 1 > & > Tbl 2 > > I need to connect the two tables using a join If these tables were created outside of Django, in other words, not using manage.py migrate, you can use Django's legacy database support to auto gen

Help to implement join query in django orm

2022-07-21 Thread Avi shah
I have two tables Tbl 1 & Tbl 2 I need to connect the two tables using a join Thanks and regards, Avi shah -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dja

Re: anti-join query in Django

2011-11-21 Thread Russell Keith-Magee
On Tue, Nov 22, 2011 at 1:39 AM, dmitry b wrote: > Hi Russ, > > Thanks for a quick response. > > I don't think Django needs to make the decision of whether or not to > do a join.  That can be done by the underlying database as long as > Django generates a query that the database can understand and

Re: anti-join query in Django

2011-11-21 Thread dmitry b
Hi Russ, Thanks for a quick response. I don't think Django needs to make the decision of whether or not to do a join. That can be done by the underlying database as long as Django generates a query that the database can understand and optimize properly. In this case, it would imply that Django

Re: anti-join query in Django

2011-11-19 Thread Russell Keith-Magee
On Sat, Nov 19, 2011 at 8:41 AM, dmitry b wrote: > Is there a recommended approach to anti-join queries?  Here's the > query I'm having an issue with: > > Branch.objects.filter(branchgroup__isnull=True)[:1] > > where branchgroup is a ManytoMany relationship to another model.  I > want to get a set

anti-join query in Django

2011-11-18 Thread dmitry b
Is there a recommended approach to anti-join queries? Here's the query I'm having an issue with: Branch.objects.filter(branchgroup__isnull=True)[:1] where branchgroup is a ManytoMany relationship to another model. I want to get a set of Branch objects that aren't mapped to any BranchGroups. Th

Re: "join" query in Django?

2009-07-31 Thread Javier Guerra
On Fri, Jul 31, 2009 at 1:42 AM, Asinox wrote: > i try > with .filter("field1__field2") where the field1 is the PK and the > field2 is the FK. that dowsn't sound right. i think you've misread the ORM chapters of the documentation. don't try to think in terms of the SQL you want. much better is

Re: "join" query in Django?

2009-07-31 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 23:42 -0700, Asinox wrote: > Thanks Malcom for replay, but, is not working for me, i think that is > simple just .filter("field1__field2"), but i cant make the join i try > with .filter("field1__field2") where the field1 is the PK and the > field2 is the FK. > > here is my q

Re: "join" query in Django?

2009-07-30 Thread Asinox
Thanks Malcom for replay, but, is not working for me, i think that is simple just .filter("field1__field2"), but i cant make the join i try with .filter("field1__field2") where the field1 is the PK and the field2 is the FK. here is my query: p = Diligencia.objects.filter(Q(socio=request.user.id)

Re: "join" query in Django?

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 21:23 -0700, Asinox wrote: > Hi, guys, how or where is the "join" query in Django? > > i think that Django dont have "join"..but how ill make join? SQL-level joins happen automatically when required. You specify your queryset in terms of fil

"join" query in Django?

2009-07-30 Thread Asinox
Hi, guys, how or where is the "join" query in Django? i think that Django dont have "join"..but how ill make join? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"