title: Hibernate seems to see private fields of entity
body: <p>We all know that, <code>private</code> members are not inherited in JAVA, or more specifically, private member variables are not visible in the child class.
  So, if I have a super class A as follows :</p>
  
  <pre><code> public class A {
  
        private int a;
        public int b;
  
   }
  </code></pre>
  
  <p>and there is other class B, which extends A as follows: </p>
  
  <pre><code> public class B extends A{}
  </code></pre>
  
  <p>now I have a following code snippet:</p>
  
  <pre><code> class b = new B();
   System.out.println(b.a);    //  Not possible since 'a' is declared privtate
   System.out.println(b.a);    // this is possible
  </code></pre>
  
  <p>Now, I have a following code that I am using in a hibernate tutorial.
  (Example involves Table_PER_CLASS strategy.)
  Here is the code,</p>
  
  <pre><code>  public class Vehicle {
    @Id
    private int vehicleId;
    private String vehicleName;
  
    public String getVehicleName() {
      return vehicleName;
    }
  
    public void setVehicleName(String vehicleName) {
      this.vehicleName = vehicleName;
    }
  
    public Vehicle() {
      // TODO Auto-generated constructor stub
    }
  
    public int getVehicleId() {
      return vehicleId;
    }
  
    public void setVehicleId(int vehicleId) {
      this.vehicleId = vehicleId;
    }
  
  }
  </code></pre>
  
  <p>And I have a TwoWheeler class as follows:</p>
  
  <pre><code> @Entity
   public class TwoWheeler extends Vehicle {
  
   private String SteeringHandle;
  
    public String getSteeringHandle() {
      return SteeringHandle;
     }
  
     public void setSteeringHandle(String steeringHandle) {
      SteeringHandle = steeringHandle;
     }
   }
  </code></pre>
  
  <p>When I run this code, a TwoWheeler table is created with following columns:</p>
  
  <pre><code> +-----------+-------------+----------------------+
   | vehicleId | vehicleName | SteeringHandle       |
   +-----------+-------------+----------------------+
   |         2 | Bike        | Bike Steering Handle |
   +-----------+-------------+----------------------+
  </code></pre>
  
  <p>But <code>vehicleId</code> and <code>vehicleName</code> are private members of Vehicle class.
  Then How are they inherited in the hibernate when the tables are created in the database?</p>