Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1607

Using unidirectional one-to-many target foreign key throws exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0-beta3
    • None
    • None
    • None

    Description

      Using this simple unidirectional relationship

      @OneToMany
      @JoinColumn(name = "DEPARTMENT_ID")
      private Set<Employee> employees;

      causes to the following exception

      <openjpa-2.0.0-beta3-r422266:926797 fatal user error> org.apache.openjpa.persistence.ArgumentException: You have supplied columns for "com.example.Department.employees", but this mapping cannot have columns in this context.

      Unidirectional one-to-many target foreign key relationship should be supported in JPA 2.0.

      Attachments

        1. openjpa-1607.tar
          6 kB
          Oliver Ringel

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oringel Oliver Ringel
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: