Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1751

FK pointing to an UNIQUE field. Problems to insert registers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 3.0.2
    • None
    • Eclipse + Java 5 + Junit + Cayenne 3.0.2 (Generic Persistent Class) + Oracle 10g Database

    Description

      I need insert a new record and the table where insert have 2 FK not null:
      If I relate TABLE_A (FK) with TABLE_B (PK) Cayenne works well but if the relationship is between TABLE_A (FK) with TABLE_C (An UNIQUE field), cayenne can´t extract de value of that UNIQUE value, and the insert sentence generated live that field null and I get next error:

      java.sql.SQLIntegrityConstraintViolationException: ORA-01400. Can not perform an insert NULL

      Attachments

        1. FruitTest.java
          3 kB
          Felipe Martín Santos
        2. fruits.sql
          1 kB
          Felipe Martín Santos
        3. FieldDomainNode.driver.xml
          0.3 kB
          Felipe Martín Santos
        4. FieldDomainMap.map.xml
          3 kB
          Felipe Martín Santos
        5. cayenne.xml
          0.4 kB
          Felipe Martín Santos
        6. cay1751.tar.gz
          37 kB
          Andrus Adamchik
        7. cay1751.tar.gz
          41 kB
          Andrus Adamchik

        Activity

          People

            Unassigned Unassigned
            fmsantos Felipe Martín Santos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: