Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2015-04-14 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  vaskalas
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  update, related  | Triage Stage:  Accepted
  model, performance |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by vaskalas):

 The unit test was added actually added in this commit,
 
https://github.com/django/django/commit/e01b5a5823fa06a63382f87472978a16c77048d2

--
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/078.7c1048c05a8ff3213a665e5a917ac1fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2015-04-13 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  vaskalas
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  update, related  | Triage Stage:  Accepted
  model, performance |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by vaskalas):

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


Comment:

 Issue was fixed in commit c21e86ab9e3e5ebd6d245d038cb0cb352cd84c3a.  Added
 unit tests to verify fix in https://github.com/django/django/pull/4499

--
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/078.3ea9a6a83c10fe0d5f8c6817a97bb7d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2015-04-13 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  vaskalas
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  update, related  | Triage Stage:  Accepted
  model, performance |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by vaskalas):

 * owner:  nobody => vaskalas
 * status:  new => assigned


--
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/078.68c3f0b3327b18a11be68284def686be%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2015-01-28 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  update, related  | Triage Stage:  Accepted
  model, performance |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by carljm):

 * status:  closed => new
 * resolution:  invalid =>
 * stage:  Unreviewed => Accepted


Comment:

 Looks like the original reporter closed it without much explanation. I'm
 reopening, because I agree this is a valid case and should be supported
 somehow (I think probably by accepting raw IDs for an FK field in
 `update`).

--
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/078.4e26491cfa28df04eeaf826f14868945%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2015-01-28 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.5
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  update, related  | Triage Stage:
  model, performance |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Microserf):

 Could I ask for additional clarifications regarding why this issue was
 closed and set to invalid? This seems like a legitimate use case to
 support, no?

--
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/078.3a3e6171b3f92337e597b23b27acefc8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2014-06-06 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.5
Component:  Database layer   |   Resolution:  invalid
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:  update, related  |  Needs documentation:  0
  model, performance |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by mbhagya@…):

 Sorry but what happened to this bug? Is this fixed in a later version?
 Because I can still see this in 1.5.

-- 
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/078.f6f5d472853067141f03ae56bd1ffbfa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21144: Not possible to update foreign key by id for a queryset

2013-09-22 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.5
Component:  Database layer   |   Resolution:  invalid
  (models, ORM)  | Triage Stage:
 Severity:  Normal   |  Unreviewed
 Keywords:  update, related  |  Needs documentation:  0
  model, performance |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by dakinsloss@…):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 My mistake--this should not have been submitted, was still debugging and
 this is not an issue.

-- 
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/078.53007d5aa86debbd1e3e25f75b6941c3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21144: Not possible to update foreign key by id for a queryset

2013-09-22 Thread Django
#21144: Not possible to update foreign key by id for a queryset
-+-
 Reporter:  dakinsloss@… |  Owner:  nobody
 Type:   | Status:  new
  Cleanup/optimization   |Version:  1.5
Component:  Database layer   |   Keywords:  update, related model,
  (models, ORM)  |  performance
 Severity:  Normal   |  Has patch:  0
 Triage Stage:  Unreviewed   |  UI/UX:  0
Easy pickings:  0|
-+-
 Attempting to minimize queries when updating list of ModelA instances that
 have foreign keys to ModelB, and I know the ids of the new ModelB
 instances I want to use for the instances of ModelA (that I only have the
 id for, not the instance).

 Trying:
 ModelA.objects.filter(pk=id_of_a_instance).update(b_id=id_of_b_instance)
 which yields 'FieldNameDoesNotExist' because 'get_field_by_name' only has
 'b' as a field name for ModelA, not b_id (which is strange given that is
 what is actually stored).

 Then I try:
 ModelA.objects.filter(pk=id_of_a_instance).update(b=id_of_b_instance),
 which says it needs an instance of ModelB, not a number.

 Which means I will be stuck with an extra query:
 model_b_list = list(ModelB.objects.filter(id_in=[list of ids for a
 instances])
 and then have to iterate through the ModelA instances and assign the
 actual ModelB instances

-- 
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/063.7ad1272d35be91a3c717e366589628a7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.