David Cramer wrote:

> but I strongly encourage you to find a
> differently solution, as LEFT JOINs can be VERY costly on system
> resources.

I realize that under some circumstances, LEFT JOINs can be costly.
However, I don't hink my case is such. Let me recall the (I believe
very simple) model:

class Ticket(models.Model):
  is_resolved = models.BooleanField()
  resolved_by = models.ForeignKey(User, null=True)

What different approach could I choose? I'm writing real-life model -
a Ticket can either have a User (who resolved it), or not (if the
ticket has not been yet resolved). Listing all resolved Tickets with
corresponding Users is a simple real-life task, too.

How do I find a different approach? The only solution which comes to
my mind is to create a "special" User with id=0, and make all None
references point to it instead, but this seems very unnatural and
hackish to me.

Any other ideas?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to