Op maandag 30 juli 2012 16:06:38 UTC+2 schreef Joris het volgende: > > > > On Monday, July 30, 2012 3:52:31 PM UTC+2, Melvyn Sopacua wrote: >> >> >> If this is not implemented as a OneToOneField, then do so. You can then >> access the related object in the same way as the reverse of a ForeignKey >> and use related_name to make this more intuitive. >> > > Yes that works great. Thanks!! > > > I'm sorry I spoke too soon. This does not work if the slow model is based on a raw SQL statement, as this statement is performed on an instance of the model. Referring to fastmodel.slow creates a new (unititialized) instance with no SQL backend and this crashes (relation does not exist). Sorry again if this is a trivial issue but I find this part of the Django docs rather hard to interpret. Many thanks for all your valuable comments so far.
-- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/zb5Mpu_Fp5EJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.