title: One single value returning null in POST request
body: <p>I'm sending this JSON in my Postman:</p>
  <pre><code>{
      &quot;restaurant&quot;: &quot;Restaurant test&quot;,
      &quot;address&quot;: &quot;Address test&quot;,
      &quot;website&quot;: &quot;Website test&quot;,
      &quot;description&quot;: &quot;Descriptionn test&quot;
  }
  </code></pre>
  <p>And for some reason, in my H2 Console, just the restaurant value is returning <strong>null</strong></p>
  <p><a href="https://i.stack.imgur.com/ywh93.png" rel="nofollow noreferrer">H2 Console Output</a></p>
  <p>I dont know exactly what is the problem, so I'm gonna show my files for Restaurant.java</p>
  <p><strong>Restaurant.java</strong></p>
  <pre><code>package com.dbserver.restaurantes.entities;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Entity
  @Table(name = &quot;tb_restaurants&quot;)
  public class Restaurant {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
      private String restaurant;
      private String address;
      private String website;
      private String description;
  
      public Restaurant() {
      }
  
      public Restaurant(Long id, String restaurant, String address, String website, String description) {
          this.id = id;
          this.restaurant = restaurant;
          this.address = address;
          this.website = website;
          this.description = description;
      }
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getName() {
          return restaurant;
      }
  
      public void setName(String restaurant) {
          this.restaurant = restaurant;
      }
  
      public String getAddress() {
          return address;
      }
  
      public void setAddress(String address) {
          this.address = address;
      }
  
      public String getWebsite() {
          return website;
      }
  
      public void setWebsite(String website) {
          this.website = website;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
  }
  </code></pre>
  <p><strong>RestaurantController.java</strong></p>
  <pre><code>package com.dbserver.restaurantes.controllers;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.data.domain.Page;
  import org.springframework.data.domain.Pageable;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.PathVariable;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  import com.dbserver.restaurantes.dto.RestaurantDTO;
  import com.dbserver.restaurantes.entities.Restaurant;
  import com.dbserver.restaurantes.services.RestaurantServices;
  
  @RestController
  @RequestMapping(value = &quot;/restaurants&quot;)
  public class RestaurantController {
  
      @Autowired
      private RestaurantServices service;
  
      @GetMapping
      public Page&lt;RestaurantDTO&gt; findAll(Pageable pageable) {
          return service.findAll(pageable);
      }
  
      @GetMapping(value = &quot;/{id}&quot;)
      public RestaurantDTO findById(@PathVariable Long id) {
          return service.findById(id);
      }
  
      @PostMapping
      public void addRestaurant(@RequestBody Restaurant newRestaurant) {
          service.addRestaurant(newRestaurant);
      }
  }
  </code></pre>
  <p><strong>RestaurantService.java</strong></p>
  <pre><code>package com.dbserver.restaurantes.services;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.data.domain.Page;
  import org.springframework.data.domain.Pageable;
  import org.springframework.stereotype.Service;
  import org.springframework.transaction.annotation.Transactional;
  
  import com.dbserver.restaurantes.dto.RestaurantDTO;
  import com.dbserver.restaurantes.entities.Restaurant;
  import com.dbserver.restaurantes.repositories.RestaurantRepository;
  
  @Service
  public class RestaurantServices {
  
      @Autowired
      private RestaurantRepository repository;
  
      @Transactional(readOnly = true)
      public Page&lt;RestaurantDTO&gt; findAll(Pageable pageable) {
          Page&lt;Restaurant&gt; result = repository.findAll(pageable);
          Page&lt;RestaurantDTO&gt; page = result.map(x -&gt; new RestaurantDTO(x));
          return page;
      }
      
      @Transactional(readOnly = true)
      public RestaurantDTO findById(Long id) {
          Restaurant result = repository.findById(id).get();
          RestaurantDTO dto = new RestaurantDTO(result);
          return dto;
      }
      
      @Transactional
      public Restaurant addRestaurant(Restaurant newRestaurant) {
          return repository.saveAndFlush(newRestaurant);
      }
  }
  </code></pre>
  <p><strong>RestaurantDTO.java</strong></p>
  <pre><code>package com.dbserver.restaurantes.dto;
  
  import com.dbserver.restaurantes.entities.Restaurant;
  
  public class RestaurantDTO {
      private Long id;
      private String restaurant;
      private String address;
      private String website;
      private String description;
  
      public RestaurantDTO() {
      }
  
      public RestaurantDTO(Long id, String restaurant, String address, String website, String description) {
          this.id = id;
          this.restaurant = restaurant;
          this.address = address;
          this.website = website;
          this.description = description;
      }
  
      public RestaurantDTO(Restaurant restaurantDTO) {
          id = restaurantDTO.getId();
          restaurant = restaurantDTO.getName();
          address = restaurantDTO.getAddress();
          website = restaurantDTO.getWebsite();
          description = restaurantDTO.getDescription();
      }
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getNome() {
          return restaurant;
      }
  
      public void setNome(String restaurant) {
          this.restaurant = restaurant;
      }
  
      public String getAddress() {
          return address;
      }
  
      public void setAddress(String address) {
          this.address = address;
      }
  
      public String getWebsite() {
          return website;
      }
  
      public void setWebsite(String website) {
          this.website = website;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
  }
  </code></pre>