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

@MapsId will replace the real column in schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I found an issue like this:
      OpenJPA will use the value of MapsId annotation replace real column in schema.
      use the attach file "src.zip", run TestClient11.java, you will get the error message:
      <openjpa-2.2.0-r422266:1244990 fatal general error> org.apache.openjpa.persistence.PersistenceException: Unknown column 'empPK' in 'field list'

      {prepstmnt 14439476 INSERT INTO DID1bDependent (empPK, name) VALUES (?, ?) [params=?, ?]}

      [code=1054, state=42S22]
      FailedObject: com.sun.ts.tests.ejb30.persistence.derivedid.ex1b.DID1bDependent@cf7fd0

      the empPK isn't the real column in schema, but it will used in sql statement

      Attachments

        1. src.zip
          5 kB
          chainho

        Activity

          People

            Unassigned Unassigned
            chainho chainho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: