title: Cannot POST A COLUMN RESTFUL API
body: <p>I have made restful API Using java hibernate jersery Framework.</p>
  
  <p>I have to post data I have done it but I'm missing with one of the column that is <code>MealTypeName</code>.
  Here is my DAO Class:</p>
  
  <pre><code>public class MealTypeDAO {
  
  public void addMealType( MealType bean) {
      Session session = SessionUtil.getSession();
      Transaction tx = session.beginTransaction();
      addMealType(session, bean);
      tx.commit();
      session.close();
  }
  
  private void addMealType(Session session, MealType bean){
      MealType mealType = new MealType();
      mealType.setMealTypename(bean.getMealTypename());
      mealType.setModifiedon(bean.getModifiedon());
      mealType.setModifiedby(bean.getModifiedby());
      session.save(mealType);
  }
  </code></pre>
  
  <p>Here is my resource class:</p>
  
  <pre><code>public class MealTypeResource {
  
  @POST
  @Path("/create")
  @Consumes("application/json")
  public Response addMealType(MealType meal){
      meal.setMealTypename(meal.getMealTypename());
      meal.setModifiedon(meal.getModifiedon());
      meal.setModifiedby(meal.getModifiedby());
  
      MealTypeDAO dao = new MealTypeDAO();
      dao.addMealType(meal);
      return Response.ok().build();
  }
  
  @GET
  @Produces("application/json")
  public Response getMealType() {
      MealTypeDAO dao = new MealTypeDAO();
      List mealTypes = dao.getMealType();
      String json = new Gson().toJson(mealTypes);
      return Response.ok().entity(json.toString()).build();
  }
  </code></pre>
  
  <p>This is my entity class:</p>
  
  <pre><code>public class MealType {
  
  
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  private int MealTypeId;
  @Column
  private String MealTypename;
  @Column
  private int modifiedby;
  @Column
  private String modifiedon;
  
  
  public int getMealTypeId() {
      return MealTypeId;
  }
  
  public void setMealTypeId(int mealTypeId) {
      MealTypeId = mealTypeId;
  }
  
  public String getMealTypename() {
      return MealTypename;
  }
  
  public void setMealTypename(String mealTypename) {
      MealTypename = mealTypename;
  }
  
  public int getModifiedby() {
      return modifiedby;
  }
  
  public void setModifiedby(int modifiedby) {
      this.modifiedby = modifiedby;
  }
  
  public String getModifiedon() {
      return modifiedon;
  }
  
  public void setModifiedon(String modifiedon) {
      this.modifiedon = modifiedon;
  }
  </code></pre>
  
  <p>MySQL DB:</p>
  
  <pre><code>CREATE TABLE `mealtype`(`Mealtypeid` int(11) NOT NULL AUTO_INCREMENT,`MealTypename` varchar(20) DEFAULT NULL,`modifiedby` int(11) NOT NULL,`modifiedon` datetime NOT NULL,PRIMARY KEY (`Mealtypeid`)) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>Now M posting these data in JSON FORMAT From POSTMAN:</p>
  
  <pre><code>{"MealTypeId":14,"MealTypename":"adsdf","modifiedby":1,"modifiedon":"2000-01-01 00:00:00"}
  </code></pre>
  
  <p>And M getting these data:</p>
  
  <pre><code>{"MealTypeId":14,"modifiedby":1,"modifiedon":"2000-01-01 00:00:00"}
  </code></pre>
  
  <p><code>MealTypename</code> is missing. How so? Can someone help me out?</p>