Menu

Error after upgrade: "Can't load lookup data for [foreign key] - Value can't be null" [closed]

0 votes

We tried to upgrade DBFront from 1.0.15.5851 to the latest. The installation went fine, but we got the following error on some tables:

"Can't load lookup data for [foreign key] - Value can't be null"

In a lot of cases where we didn't have lookup tables previously, we added them so that DBFront could generate dropdown tables for acceptable values. We did this in a quick and non-standard way - we left the values in the main table as is, got a distinct list of values, and created a new lookup table with this list. One of those values (for a number of tables) was null, which I assume is causing the problem above.

Is there a quick fix for this on your end (since this worked before), or will we need to create IDs and more proper lookup tables?

Thanks.

closed with the note: Issue resolved
in Installation by (290 points)
closed by
Are the Null values intended to be valid lookup (JOIN) values?
Yes, they are.
Do the JOINS work?  Will the null records return on a regular JOIN?  What was the syntax used to create the relationship?
A helpful article that describes the problem: https://bertwagner.com/posts/joining-on-nulls/
Actually, I misspoke. I just noticed that instead of actual NULLs, we have a blank record in the lookup tables, though the main tables have NULLs. It seems like the old version of DBFront may have just ignored these? In any case, I can convert all the NULLs to blanks and try again.
Good to know.  I will check things out on my side.
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...