Fix of wrong code generation. Model domain was not properly mapped to
actual columns.