On 8/16/07, kahless <[EMAIL PROTECTED]> wrote: > I have a simple 'Post' model which has a 'author' ForeignKey linking > to a 'User' object - is there a way to access post.author.id without > django triggering a database query ? > - i tried to use the db column name - post.author_id .. and it > worked.. so the question remains - is this behavior i can count on, or > just luck that it had the same name ?
This behaviour is valid, and will remain so. Django uses this feature internally in many places, especially in the serializers. Any suggestions on how to improve the documentation of this issue are welcome. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---