title: java.lang.NullPointerException at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue(AbstractEntityTuplizer.java:521)
body: <p>I am new to hibernate, I just had some doubts and clarified in this website (<a href="https://stackoverflow.com/questions/16496496/one-to-many-relationship-and-other-object-relation/16496734#comment23847995_16496734">One to many relationship and Other object relation</a>). </p>
  
  <p><img src="https://i.stack.imgur.com/W1zaY.png" alt="enter image description here"></p>
  
  <p>For the same application i am facing different issue. the exception is, what i am missing in this app.</p>
  
  <pre><code>Hibernate: insert into TestDB.customer (name, registrationDate) values (?, ?)
  Hibernate: insert into TestDB.tickets (accessories, comments, uid, problem, problemFiledDate, repairTye, status, statusChangedDate) values (?, ?, ?, ?, ?, ?, ?, ?)
  Exception in thread "main" java.lang.NullPointerException
      at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValue(AbstractEntityTuplizer.java:521)
      at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValue(AbstractEntityPersister.java:3867)
      at org.hibernate.id.ForeignGenerator.generate(ForeignGenerator.java:100)
      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
      at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
      at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
      at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
      at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
      at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
      at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
      at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:475)
      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:353)
      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
      at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
      at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
      at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
      at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
      at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
      at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425)
      at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362)
      at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338)
      at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
      at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
      at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:475)
      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:353)
      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)
      at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
      at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
      at com.test.CustomerRunWithTicketsWithPay.saveCustomer(CustomerRunWithTicketsWithPay.java:83)
      at com.test.CustomerRunWithTicketsWithPay.main(CustomerRunWithTicketsWithPay.java:22)
  </code></pre>
  
  <p>My Application code is</p>
  
  <p><strong>My objects, Customer :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Q0ZWx.png" alt="enter image description here"></p>
  
  <p><strong>Address :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/EwJFL.png" alt="enter image description here"></p>
  
  <p><strong>Tickets :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Gv2vn.png" alt="enter image description here"></p>
  
  <p><strong>Payment :</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/b2OX3.png" alt="enter image description here"></p>
  
  <p><strong>Test program is :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/UtZvB.png" alt="enter image description here"></p>
  
  <p><strong>My Hibernate Configuration is :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/JzRnN.png" alt="enter image description here"></p>