/**
  * @param \Magia\Model\MagickEloquent $item
  */
 public function generateFields($item)
 {
     $fields = array();
     $table = $item->getTable();
     foreach ($item->getAttributes() as $index => $value) {
         $fields[] = $this->generateField($table, $index, $value);
     }
     foreach ($item->getRelations() as $relation => $relationModel) {
         $relationObject = $item->{$relation}();
         $fields[] = $this->generateFieldFromRelation($relation, $relationObject, $relationModel);
     }
     return $fields;
 }