Generate entities from db tables