Changes between Initial Version and Version 1 of Ticket #27414


Ignore:
Timestamp:
Nov 1, 2016, 1:15:45 PM (8 years ago)
Author:
MikiSoft
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27414

    • Property Summary Aliasing ForeignKey fields return integer value, not objectAliasing ForeignKey fields return integer values, not object
  • Ticket #27414 – Description

    initial v1  
    1 Assuming that Relationship consists of `from_person` and `to_person` fields, here's an simple example:
     1Assuming that Relationship consists of `from_person` and `to_person` ForeignKey fields (which point to User), here's an simple example of showing the actual problem:
    22{{{#!python
    33>> results = Relationship.objects.all().annotate(target=F('to_person'))
     
    3131)
    3232}}}
    33 But it still doesn't work. So that's the reason why I think that this is a bug, as I haven't found any explanation for this behavior nor any solution.
     33But it still doesn't work. So that's the reason why I think that this is a bug, as I haven't found any explanation for this behavior. In my case in aliased fields I would need objects to be returned, not only IDs of them, therefore I don't know how to solve this.
Back to Top