In case there is no primary field dx throws an exception