A son who spent decades working on his family's NSW farm believing he would inherit it has won a bitter court battle - but the victory comes with a major catch.