Re: Problem with empty has_a

[prev] [thread] [next] [Date index for 2005/05/20]

From: Perrin Harkins
Subject: Re: Problem with empty has_a
Date: 13:43 on 20 May 2005
Thomas Klausner wrote:
> Seems I need a might_has_a relationship.

You already discovered that doesn't work, but FYI, might_have() is not 
for situations where you have a has_a() which might be NULL.  The 
has_a() relationship handles NULLs just fine.  The might_have() is for 
situations where you have a has_many() that will never have more than 
one, i.e. another table has 0 or 1 rows with a foreign key pointing to 
this table.  It's a very rare situation.

- Perrin

Problem with empty has_a
Thomas Klausner 19:34 on 19 May 2005

Re: Problem with empty has_a
Tony Bowden 21:01 on 19 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:05 on 20 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:39 on 20 May 2005

Re: Problem with empty has_a
merlyn (Randal L. Schwartz) 12:20 on 20 May 2005

Re: Problem with empty has_a
Tony Bowden 12:33 on 20 May 2005

Re: Problem with empty has_a
Perrin Harkins 13:43 on 20 May 2005

Generated at 15:51 on 25 May 2005 by mariachi v0.52