fix ORM mapping and trait usage