IsUnique confusion

Sep 23, 2011 at 6:14 AM

I have a Type table, PhoneType. with two columns, ID and Name, and two records of static data.

I have another table, UserPhone, that has a foreign key, PhoneTypeID, that comes from PhoneType.ID.

If UserPhone.PhoneTypeID's IsUnique is false, I get a verifier error: "The column PhoneTypeID in table 'UserPhone' must be marked unique because there is a non-primary key relationship that depends on it."

If UserPhone.PhoneTypeID's IsUnique is true, there are no verifier errors.

That doesn't make sense to me. PhoneType is a lookup table for UserPhone. It is a one-to-many relationship where many phones could be landline or cell.

What am I missing?



Sep 24, 2011 at 1:30 AM

Just to check, make sure your relationship is from the type table to the UserPhone table. A relation must be from a primary key (or at least a unique key) to another field. I think you might have your relationship backwards. Please confirm and if not I will investigate further.

Sep 25, 2011 at 4:59 AM

Ah, the relationship was backwards. The verification works. Thanks!