views:

22

answers:

1

My problem: I'm writing a flex frontend to a rails app, and I'm having problems in managing NULL database values.. so to avoid problems I just don't allow NULL.

Now, for foreign keys, would 0 be fine? No chance that a record be assigned ID 0, right? Maybe I could somehow tell rails to skip foreign key updates if input is 0..

A: 

If there's no matching row with a foreign key value of 0, it should work fine, because then there's nothing to update.

DR