Hi, 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 ?
I couldn't find any documentation on it on djangoproject.com/ documentation/ but the inline documentation for fields read: "attname: The attribute to use on the model object. This is the same as "name", except in the case of ForeignKeys, where "_id" is appended" thanks, herbert http://sct.sphene.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---