Leftover: also use logic layer in relations.