fix data model with relationships