Changes between Initial Version and Version 1 of Ticket #27414
- Timestamp:
- Nov 1, 2016, 1:15:45 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27414
- Property Summary Aliasing ForeignKey fields return integer value, not object → Aliasing 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:1 Assuming 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: 2 2 {{{#!python 3 3 >> results = Relationship.objects.all().annotate(target=F('to_person')) … … 31 31 ) 32 32 }}} 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.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. 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.