I'm not reporting this as a bug, more a question as to whether there's a specific reason it's done this way. I guess it's a house style but I notice in the new 4.20 beta that for example, Category.ParentCategoryId and Category.PictureId have zero as the 'nothing' value rather than having null (and a nullable field).
Same with Product.DownloadId, Product.GiftCardTypeId and others, I can't find a single nullable FK from a wander through so I guess it's across the board.
I've always used a nullable FK and used null for 'not a sausage' rather than zero and always found it done that way that in numerous existing client databases when contracting in the UK so it seems like very much the standard practice.
It's the same in my circa NOP3.1 database too, so not a recent change with a view to being compatible with some DB I've not come across that doesn't do nulls... if there is such a thing, so I thought I'd ask.
Is there a specific reason to do this ? - I ask partly out of curiosity and partly as there may be a good reason to do it that way that I've been missing all these years.
*added soon after*
It's late night here, so I'm being a bit slow but I just realised that this means there's no enforcing of referential integrity, there being no Category zero... I told a new product that it was associated with vendor 123456 and the database was happy with that... err, isn't this a terrible idea ? - apologies, not meaning to be a die-hard fuddy-duddy but isn't referential integrity fairly important ?