I've always been under the impression that Jedi COULD go and have a relationship if they chose to. However, that relationship would cause them some degree of turmoil sometime in the future through being forced to choose what's best for their family or what's best for their order/nation/whatever.
The Code basically being more like "K.I.S.S. Don't fuck around!"