2 Replies Latest reply on Oct 11, 2005 9:35 AM by Martin Ganserer

    ManyToOne Problem

    Martin Ganserer Novice


      I have a problem with a unidirectional ManyToOne-Relationship.

      class customer
       public Country getCountry()
       return country;

      When I try to persist a customer object I get following error:

       Cannot add or update a child row: a foreign key constraint fails
      10:54:20,265 INFO [STDOUT] ...; CausedByException is:
       Could not execute JDBC batch update

      Can somebody please help me?