Re: [Django] #19018: m2m relationships with a through field don't respect types.

2015-03-13 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by knbk):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Fixed as part of 34ba86706f0db33d9a0ab44e4abb78703e7262a9:

 Fixed #14334 -- Query relation lookups now check object types.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.d2f0890cd8c8f2a5ce7943f27f3c5b1a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by ptone):

 So looking at this mostly for my own edification.

 A higher level place this could be checked would be
 `db.models.where.Constraint.process`

 otherwise: `db.models.fields.related.RelatedField.get_db_prep_lookup` and
 `db.models.fields.related.RelatedField._pk_trace`

 seem like the best places to tackle this.

 However unless a patch is pretty quick, it seems worth improving the docs,
 at least in the interim, to clarify that lookup values for model instances
 will always be converted to a simple pk value for database lookups.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by Alex):

 Everything you just said is correct, it's not just your belief :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by carljm):

 (Also not specific to `__in` queries, same is true of a simple `__exact`
 match on an FK field).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by carljm):

 I don't believe this bug is specific to m2ms or through models at all. In
 general, currently you can pass any iterable of instances of any model to
 any `__in` query and the ORM will happily use the PKs of the models you
 give it, without checking whether they are an instance of the right model
 class (or a subclass, or raw PK values which is also supported).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by Alex):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
-+-
 Reporter:  justinlilly  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by justinlilly):

 * needs_better_patch:   => 0
 * type:  Uncategorized => Bug
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #19018: m2m relationships with a through field don't respect types.

2012-09-24 Thread Django
#19018: m2m relationships with a through field don't respect types.
--+
 Reporter:  justinlilly   |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.4
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 I ran into an issue today in which an empty list was returned from a
 Queryset when it should have been a blatant failure.

 Given the models in
 
https://github.com/django/django/blob/master/tests/modeltests/m2m_through/models.py

 The following returns an empty queryset:

 {{{#!python
   Group.objects.filter(members__in=[Friendship(pk=9)])
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.