OpenJPA
  1. OpenJPA
  2. OPENJPA-382

Overriding column names for Byte[] attributes causes exception.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.1, 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      If an entity has an attribute of type Byte array and the column name is overridden in xml the following error will occur.

      <openjpa-1.0.0-SNAPSHOT-r420667:566855 fatal user error>
      org.apache.openjpa.persistence.ArgumentException: You have supplied columns for
      "org.apache.openjpa.persistence.xml.XmlOverrideEntity.picture<element:class java.lang.Byte>", but this mapping cannot have columns in this context.

      Code snippets follow :

      public class XmlOverrideEntity {
      <snip>
      @Column(name="PICTURE")
      @Lob
      private Byte[] picture;
      <snip>
      }

      // orm.xml
      <entity name="XmlOverride" class="XmlOverrideEntity">
      <attributes>
      <basic name="name" optional="true"></basic>
      <basic name="description" optional="false"></basic>
      <basic name="picture" fetch="EAGER">
      <column name="pic_xml"/>
      <lob/>
      </basic>
      </attributes>
      </entity>

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        13m 26s 1 Michael Dick 24/Sep/07 17:25
        Closed Closed Reopened Reopened
        1250d 7m 1 Michael Dick 25/Feb/11 16:32
        Reopened Reopened Resolved Resolved
        8s 1 Michael Dick 25/Feb/11 16:32
        Resolved Resolved Closed Closed
        6s 1 Michael Dick 25/Feb/11 16:33
        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Michael Dick made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Michael Dick [ mikedd ]
        Michael Dick made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Michael Dick created issue -

          People

          • Assignee:
            Michael Dick
            Reporter:
            Michael Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development